Initial: 22 MCP tool-call fixtures (valid + invalid)
Browse files- README.md +71 -0
- data.jsonl +22 -0
README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
tags:
|
| 6 |
+
- mcp
|
| 7 |
+
- model-context-protocol
|
| 8 |
+
- tool-use
|
| 9 |
+
- testing
|
| 10 |
+
- agents
|
| 11 |
+
- validation
|
| 12 |
+
size_categories:
|
| 13 |
+
- n<1K
|
| 14 |
+
configs:
|
| 15 |
+
- config_name: default
|
| 16 |
+
data_files:
|
| 17 |
+
- split: train
|
| 18 |
+
path: data.jsonl
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
# mcp-tool-test-fixtures
|
| 22 |
+
|
| 23 |
+
22 test fixtures for common MCP (Model Context Protocol) tool calls — a mix of valid and invalid args across 8 categories. Use these to test tool-arg validators, sandboxes, or any layer that sits between an LLM and a tool.
|
| 24 |
+
|
| 25 |
+
## Categories
|
| 26 |
+
|
| 27 |
+
| Category | Count |
|
| 28 |
+
|---|---|
|
| 29 |
+
| `filesystem` | 5 |
|
| 30 |
+
| `git` | 3 |
|
| 31 |
+
| `github` | 3 |
|
| 32 |
+
| `slack` | 2 |
|
| 33 |
+
| `http` | 3 |
|
| 34 |
+
| `shell` | 2 |
|
| 35 |
+
| `calculator` | 2 |
|
| 36 |
+
| `web` | 2 |
|
| 37 |
+
|
| 38 |
+
About **half** are intentionally invalid — missing required fields, dangerous commands, escape attempts, wrong types — so your validator gets exercised on negative cases too.
|
| 39 |
+
|
| 40 |
+
## Schema
|
| 41 |
+
|
| 42 |
+
```jsonc
|
| 43 |
+
{
|
| 44 |
+
"id": "string",
|
| 45 |
+
"tool": "string", // dotted MCP tool name
|
| 46 |
+
"args": { ... }, // args the LLM produced
|
| 47 |
+
"expected": {
|
| 48 |
+
"valid": true | false,
|
| 49 |
+
"reason": "string" // present when invalid
|
| 50 |
+
},
|
| 51 |
+
"category": "string"
|
| 52 |
+
}
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
## Quickstart
|
| 56 |
+
|
| 57 |
+
```python
|
| 58 |
+
from datasets import load_dataset
|
| 59 |
+
ds = load_dataset("mukunda1729/mcp-tool-test-fixtures", split="train")
|
| 60 |
+
invalid = [r for r in ds if not r["expected"]["valid"]]
|
| 61 |
+
print(f"{len(invalid)} invalid cases for negative testing")
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
+
## Related
|
| 65 |
+
|
| 66 |
+
- [`agentvet` on PyPI](https://pypi.org/project/agentvet-py/) — wraps tool calls, validates args, returns LLM-friendly retry hints
|
| 67 |
+
- [The Agent Reliability Stack](https://mukundakatta.github.io/agent-stack/)
|
| 68 |
+
|
| 69 |
+
## License
|
| 70 |
+
|
| 71 |
+
MIT.
|
data.jsonl
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"id": "fs-read-1", "tool": "filesystem.read_file", "args": {"path": "/tmp/example.txt"}, "expected": {"valid": true}, "category": "filesystem"}
|
| 2 |
+
{"id": "fs-read-2", "tool": "filesystem.read_file", "args": {"path": "../../../etc/passwd"}, "expected": {"valid": false, "reason": "path_escape"}, "category": "filesystem"}
|
| 3 |
+
{"id": "fs-read-3", "tool": "filesystem.read_file", "args": {}, "expected": {"valid": false, "reason": "missing_required: path"}, "category": "filesystem"}
|
| 4 |
+
{"id": "fs-write-1", "tool": "filesystem.write_file", "args": {"path": "/tmp/out.txt", "content": "hello"}, "expected": {"valid": true}, "category": "filesystem"}
|
| 5 |
+
{"id": "fs-write-2", "tool": "filesystem.write_file", "args": {"path": "/tmp/out.txt", "content": 123}, "expected": {"valid": false, "reason": "wrong_type: content must be string"}, "category": "filesystem"}
|
| 6 |
+
{"id": "git-status-1", "tool": "git.status", "args": {"repo": "/Users/me/proj"}, "expected": {"valid": true}, "category": "git"}
|
| 7 |
+
{"id": "git-commit-1", "tool": "git.commit", "args": {"repo": "/Users/me/proj", "message": "fix bug"}, "expected": {"valid": true}, "category": "git"}
|
| 8 |
+
{"id": "git-commit-2", "tool": "git.commit", "args": {"repo": "/Users/me/proj"}, "expected": {"valid": false, "reason": "missing_required: message"}, "category": "git"}
|
| 9 |
+
{"id": "github-search-1", "tool": "github.search_issues", "args": {"q": "is:open label:bug"}, "expected": {"valid": true}, "category": "github"}
|
| 10 |
+
{"id": "github-issue-1", "tool": "github.create_issue", "args": {"repo": "owner/name", "title": "bug", "body": "details"}, "expected": {"valid": true}, "category": "github"}
|
| 11 |
+
{"id": "github-issue-2", "tool": "github.create_issue", "args": {"repo": "owner/name"}, "expected": {"valid": false, "reason": "missing_required: title"}, "category": "github"}
|
| 12 |
+
{"id": "slack-send-1", "tool": "slack.send_message", "args": {"channel": "#general", "text": "hi"}, "expected": {"valid": true}, "category": "slack"}
|
| 13 |
+
{"id": "slack-send-2", "tool": "slack.send_message", "args": {"channel": "#general"}, "expected": {"valid": false, "reason": "missing_required: text"}, "category": "slack"}
|
| 14 |
+
{"id": "fetch-1", "tool": "fetch.get", "args": {"url": "https://api.example.com/v1/data"}, "expected": {"valid": true}, "category": "http"}
|
| 15 |
+
{"id": "fetch-2", "tool": "fetch.get", "args": {"url": "file:///etc/passwd"}, "expected": {"valid": false, "reason": "scheme_not_allowed"}, "category": "http"}
|
| 16 |
+
{"id": "fetch-3", "tool": "fetch.get", "args": {"url": "not-a-url"}, "expected": {"valid": false, "reason": "invalid_url"}, "category": "http"}
|
| 17 |
+
{"id": "shell-1", "tool": "shell.exec", "args": {"cmd": "ls"}, "expected": {"valid": true}, "category": "shell"}
|
| 18 |
+
{"id": "shell-2", "tool": "shell.exec", "args": {"cmd": "rm -rf /"}, "expected": {"valid": false, "reason": "dangerous_command"}, "category": "shell"}
|
| 19 |
+
{"id": "calc-1", "tool": "calculator.eval", "args": {"expr": "2+2"}, "expected": {"valid": true}, "category": "calculator"}
|
| 20 |
+
{"id": "calc-2", "tool": "calculator.eval", "args": {"expr": "__import__('os').system('ls')"}, "expected": {"valid": false, "reason": "unsafe_expression"}, "category": "calculator"}
|
| 21 |
+
{"id": "search-1", "tool": "web.search", "args": {"q": "python tutorials", "num": 5}, "expected": {"valid": true}, "category": "web"}
|
| 22 |
+
{"id": "search-2", "tool": "web.search", "args": {"q": "", "num": 5}, "expected": {"valid": false, "reason": "empty_query"}, "category": "web"}
|