@nano-step/skill-manager 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +218 -0
- package/bin/cli.js +9 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +34 -0
- package/dist/install.d.ts +1 -0
- package/dist/install.js +35 -0
- package/dist/remove.d.ts +1 -0
- package/dist/remove.js +32 -0
- package/dist/update.d.ts +1 -0
- package/dist/update.js +53 -0
- package/dist/utils.d.ts +30 -0
- package/dist/utils.js +154 -0
- package/package.json +47 -0
- package/templates/agent.json +11 -0
- package/templates/command-refresh.md +100 -0
- package/templates/command-workflow.md +188 -0
- package/templates/skill/SKILL.md +284 -0
- package/templates/skill/assets/tools-template.json +140 -0
- package/templates/skill/assets/workflow-schema.json +81 -0
- package/templates/skill/assets/workflow-templates.json +112 -0
- package/templates/skill/references/error-handling.md +260 -0
- package/templates/skill/references/result-handling.md +242 -0
- package/templates/skill/references/tool-categories.md +247 -0
- package/templates/skill/references/tool-execution.md +347 -0
- package/templates/skill/references/workflows.md +233 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Agent Skill Tools Cache v2.0.0",
|
|
4
|
+
"description": "Cache file for MCP tool routing. Generated by /agent-skill-refresh command using semantic AI categorization.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"version": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "Schema version (2.0.0 for semantic categorization)",
|
|
10
|
+
"const": "2.0.0"
|
|
11
|
+
},
|
|
12
|
+
"generated_at": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"format": "date-time",
|
|
15
|
+
"description": "ISO 8601 timestamp when cache was generated"
|
|
16
|
+
},
|
|
17
|
+
"tool_count": {
|
|
18
|
+
"type": "integer",
|
|
19
|
+
"description": "Total number of tools indexed",
|
|
20
|
+
"minimum": 0
|
|
21
|
+
},
|
|
22
|
+
"categories": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"description": "AI-generated categories for tool routing",
|
|
25
|
+
"additionalProperties": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"properties": {
|
|
28
|
+
"name": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "Human-readable category name"
|
|
31
|
+
},
|
|
32
|
+
"description": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "One sentence describing what this category does"
|
|
35
|
+
},
|
|
36
|
+
"keywords": {
|
|
37
|
+
"type": "array",
|
|
38
|
+
"items": { "type": "string" },
|
|
39
|
+
"description": "5-10 routing keywords for matching user requests",
|
|
40
|
+
"minItems": 5,
|
|
41
|
+
"maxItems": 10
|
|
42
|
+
},
|
|
43
|
+
"tools": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": { "type": "string" },
|
|
46
|
+
"description": "List of tool IDs in this category"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"required": ["name", "description", "keywords", "tools"]
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"tools": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"description": "Tool lookup map for O(1) access by tool ID",
|
|
55
|
+
"additionalProperties": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"properties": {
|
|
58
|
+
"category": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"description": "Category ID this tool belongs to"
|
|
61
|
+
},
|
|
62
|
+
"description": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"description": "Tool description"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"required": ["category", "description"]
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"required": ["version", "generated_at", "tool_count", "categories", "tools"],
|
|
72
|
+
"example": {
|
|
73
|
+
"version": "2.0.0",
|
|
74
|
+
"generated_at": "2026-01-27T03:00:00.000Z",
|
|
75
|
+
"tool_count": 75,
|
|
76
|
+
"categories": {
|
|
77
|
+
"browser-automation": {
|
|
78
|
+
"name": "Browser Automation",
|
|
79
|
+
"description": "Web page interaction, screenshots, DOM manipulation, navigation",
|
|
80
|
+
"keywords": ["screenshot", "click", "navigate", "page", "browser", "element", "form", "DOM"],
|
|
81
|
+
"tools": [
|
|
82
|
+
"MetaMCP_chrome-devtools__take_screenshot",
|
|
83
|
+
"MetaMCP_chrome-devtools__click",
|
|
84
|
+
"MetaMCP_chrome-devtools__fill",
|
|
85
|
+
"MetaMCP_chrome-devtools__navigate_page"
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
"version-control": {
|
|
89
|
+
"name": "Version Control",
|
|
90
|
+
"description": "Git operations, pull requests, issues, code review",
|
|
91
|
+
"keywords": ["PR", "pull request", "issue", "commit", "branch", "merge", "review", "git"],
|
|
92
|
+
"tools": [
|
|
93
|
+
"MetaMCP_github-zengaming__get_pull_request",
|
|
94
|
+
"MetaMCP_github-zengaming__list_issues",
|
|
95
|
+
"MetaMCP_github-zengaming__list_commits"
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
"documentation": {
|
|
99
|
+
"name": "Documentation",
|
|
100
|
+
"description": "Library documentation lookup and API references",
|
|
101
|
+
"keywords": ["docs", "documentation", "library", "API", "reference", "example", "usage"],
|
|
102
|
+
"tools": [
|
|
103
|
+
"MetaMCP_context7__resolve-library-id",
|
|
104
|
+
"MetaMCP_context7__query-docs"
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
"communication": {
|
|
108
|
+
"name": "Communication",
|
|
109
|
+
"description": "Messaging and notifications across platforms",
|
|
110
|
+
"keywords": ["message", "send", "post", "channel", "notify", "chat", "slack"],
|
|
111
|
+
"tools": [
|
|
112
|
+
"slack_post_message",
|
|
113
|
+
"slack_list_channels"
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"tools": {
|
|
118
|
+
"MetaMCP_chrome-devtools__take_screenshot": {
|
|
119
|
+
"category": "browser-automation",
|
|
120
|
+
"description": "Take a screenshot of the page or element"
|
|
121
|
+
},
|
|
122
|
+
"MetaMCP_chrome-devtools__click": {
|
|
123
|
+
"category": "browser-automation",
|
|
124
|
+
"description": "Click on the provided element"
|
|
125
|
+
},
|
|
126
|
+
"MetaMCP_github-zengaming__get_pull_request": {
|
|
127
|
+
"category": "version-control",
|
|
128
|
+
"description": "Get details of a specific pull request"
|
|
129
|
+
},
|
|
130
|
+
"MetaMCP_context7__query-docs": {
|
|
131
|
+
"category": "documentation",
|
|
132
|
+
"description": "Query library documentation"
|
|
133
|
+
},
|
|
134
|
+
"slack_post_message": {
|
|
135
|
+
"category": "communication",
|
|
136
|
+
"description": "Post a message to a Slack channel"
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Agent Skill Workflow Definition",
|
|
4
|
+
"description": "Schema for defining prerequisite workflows in Agent Skill Manager",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"enabled": {
|
|
8
|
+
"type": "boolean",
|
|
9
|
+
"default": true,
|
|
10
|
+
"description": "Whether this workflow is active"
|
|
11
|
+
},
|
|
12
|
+
"description": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "Human-readable description of the workflow"
|
|
15
|
+
},
|
|
16
|
+
"triggers": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"description": "Conditions that activate this workflow (OR logic - any match triggers)",
|
|
19
|
+
"properties": {
|
|
20
|
+
"category": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "Tool category that triggers this workflow"
|
|
23
|
+
},
|
|
24
|
+
"tools": {
|
|
25
|
+
"type": "array",
|
|
26
|
+
"items": { "type": "string" },
|
|
27
|
+
"description": "Specific tool names that trigger this workflow"
|
|
28
|
+
},
|
|
29
|
+
"keywords": {
|
|
30
|
+
"type": "array",
|
|
31
|
+
"items": { "type": "string" },
|
|
32
|
+
"description": "Keywords in task text that trigger this workflow"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"prerequisites": {
|
|
37
|
+
"type": "array",
|
|
38
|
+
"description": "Steps to execute before the main action",
|
|
39
|
+
"items": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"required": ["step", "tool", "description"],
|
|
42
|
+
"properties": {
|
|
43
|
+
"step": {
|
|
44
|
+
"type": "integer",
|
|
45
|
+
"minimum": 1,
|
|
46
|
+
"description": "Execution order (1-based)"
|
|
47
|
+
},
|
|
48
|
+
"tool": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"description": "Tool name to execute"
|
|
51
|
+
},
|
|
52
|
+
"description": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"description": "Why this prerequisite is needed"
|
|
55
|
+
},
|
|
56
|
+
"required": {
|
|
57
|
+
"type": "boolean",
|
|
58
|
+
"default": true,
|
|
59
|
+
"description": "Whether this step can be skipped"
|
|
60
|
+
},
|
|
61
|
+
"params": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"description": "Default parameters for this tool"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"mode": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"enum": ["enforce", "warn", "suggest"],
|
|
71
|
+
"default": "enforce",
|
|
72
|
+
"description": "How strictly to apply prerequisites: enforce (auto-run), warn (ask), suggest (mention only)"
|
|
73
|
+
},
|
|
74
|
+
"created_at": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"format": "date-time",
|
|
77
|
+
"description": "When this workflow was created"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"required": ["description", "triggers", "prerequisites"]
|
|
81
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"templates": {
|
|
3
|
+
"database": {
|
|
4
|
+
"name": "database-safe-query",
|
|
5
|
+
"description": "Inspect database structure before executing queries",
|
|
6
|
+
"triggers": {
|
|
7
|
+
"category": "database",
|
|
8
|
+
"tools": ["execute_query", "select_query"],
|
|
9
|
+
"keywords": ["query", "select", "insert", "update", "delete", "sql"]
|
|
10
|
+
},
|
|
11
|
+
"prerequisites": [
|
|
12
|
+
{
|
|
13
|
+
"step": 1,
|
|
14
|
+
"tool": "list_databases",
|
|
15
|
+
"description": "List available databases to know what's accessible",
|
|
16
|
+
"required": true
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"step": 2,
|
|
20
|
+
"tool": "list_tables",
|
|
21
|
+
"description": "List tables in the target database",
|
|
22
|
+
"required": true
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"step": 3,
|
|
26
|
+
"tool": "inspect_table",
|
|
27
|
+
"description": "Check column names, types, and constraints",
|
|
28
|
+
"required": true
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"step": 4,
|
|
32
|
+
"tool": "get_indexes",
|
|
33
|
+
"description": "Check indexes for query optimization",
|
|
34
|
+
"required": false
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"mode": "enforce"
|
|
38
|
+
},
|
|
39
|
+
"browser": {
|
|
40
|
+
"name": "browser-safe-interaction",
|
|
41
|
+
"description": "Take snapshot before interacting with page elements",
|
|
42
|
+
"triggers": {
|
|
43
|
+
"category": "browser",
|
|
44
|
+
"tools": ["click", "fill", "fill_form", "submit"],
|
|
45
|
+
"keywords": ["click", "fill", "submit", "form", "button"]
|
|
46
|
+
},
|
|
47
|
+
"prerequisites": [
|
|
48
|
+
{
|
|
49
|
+
"step": 1,
|
|
50
|
+
"tool": "take_snapshot",
|
|
51
|
+
"description": "Capture current page state and element UIDs",
|
|
52
|
+
"required": true
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"mode": "enforce"
|
|
56
|
+
},
|
|
57
|
+
"github-pr": {
|
|
58
|
+
"name": "github-pr-review",
|
|
59
|
+
"description": "Gather PR context before reviewing or merging",
|
|
60
|
+
"triggers": {
|
|
61
|
+
"category": "github",
|
|
62
|
+
"tools": ["merge_pull_request", "create_pull_request_review"],
|
|
63
|
+
"keywords": ["merge", "review pr", "approve pr"]
|
|
64
|
+
},
|
|
65
|
+
"prerequisites": [
|
|
66
|
+
{
|
|
67
|
+
"step": 1,
|
|
68
|
+
"tool": "get_pull_request",
|
|
69
|
+
"description": "Get PR details and description",
|
|
70
|
+
"required": true
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"step": 2,
|
|
74
|
+
"tool": "get_pull_request_files",
|
|
75
|
+
"description": "List changed files",
|
|
76
|
+
"required": true
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"step": 3,
|
|
80
|
+
"tool": "get_pull_request_status",
|
|
81
|
+
"description": "Check CI/CD status and reviews",
|
|
82
|
+
"required": true
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"mode": "warn"
|
|
86
|
+
},
|
|
87
|
+
"graphql": {
|
|
88
|
+
"name": "graphql-schema-aware",
|
|
89
|
+
"description": "Understand schema before executing queries",
|
|
90
|
+
"triggers": {
|
|
91
|
+
"category": "graphql",
|
|
92
|
+
"tools": ["execute_query", "execute_mutation"],
|
|
93
|
+
"keywords": ["graphql query", "graphql mutation"]
|
|
94
|
+
},
|
|
95
|
+
"prerequisites": [
|
|
96
|
+
{
|
|
97
|
+
"step": 1,
|
|
98
|
+
"tool": "get_schema",
|
|
99
|
+
"description": "Fetch GraphQL schema",
|
|
100
|
+
"required": true
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"step": 2,
|
|
104
|
+
"tool": "filter_types",
|
|
105
|
+
"description": "Identify relevant types",
|
|
106
|
+
"required": false
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"mode": "suggest"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
# Agent Skill Error Handling Reference
|
|
2
|
+
# Scope: recovery flows, templates, and decisioning.
|
|
3
|
+
# Do not include routing logic, cache schema, or result summarization here.
|
|
4
|
+
|
|
5
|
+
## Error Classes
|
|
6
|
+
1. Tool not found
|
|
7
|
+
2. Execution failure
|
|
8
|
+
3. Timeout
|
|
9
|
+
4. Cache missing or invalid
|
|
10
|
+
5. Partial success
|
|
11
|
+
6. Invalid parameters
|
|
12
|
+
|
|
13
|
+
## Automatic Retry Mechanism
|
|
14
|
+
|
|
15
|
+
The agent-skill-manager automatically retries failed tool executions before returning errors.
|
|
16
|
+
|
|
17
|
+
### Retry Configuration
|
|
18
|
+
- Maximum attempts: 3
|
|
19
|
+
- Backoff delays: 0s (immediate), 1s, 2s
|
|
20
|
+
- Applies to: All tool executions (single, batch, chain, passthrough)
|
|
21
|
+
|
|
22
|
+
### Retry Behavior
|
|
23
|
+
1. First attempt fails → Immediate retry (0s delay)
|
|
24
|
+
2. Second attempt fails → Wait 1s, then retry
|
|
25
|
+
3. Third attempt fails → Return failure report
|
|
26
|
+
|
|
27
|
+
### Failure Report Format
|
|
28
|
+
When all retry attempts fail, return structured report:
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"tool": "tool_name",
|
|
32
|
+
"attempts": 3,
|
|
33
|
+
"errors": [
|
|
34
|
+
"Attempt 1: connection timeout",
|
|
35
|
+
"Attempt 2: connection timeout",
|
|
36
|
+
"Attempt 3: service unavailable"
|
|
37
|
+
],
|
|
38
|
+
"suggestion": "Check network connectivity or try again later"
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Retry Scope in Batch/Chain
|
|
43
|
+
- **Batch mode**: Each tool has independent retry budget
|
|
44
|
+
- **Chain mode**: Failed tool retries before aborting chain
|
|
45
|
+
- Partial results preserved when possible
|
|
46
|
+
|
|
47
|
+
### Non-Retryable Errors
|
|
48
|
+
Some errors should NOT trigger retry:
|
|
49
|
+
- Invalid parameters (user error)
|
|
50
|
+
- Tool not found (cache issue)
|
|
51
|
+
- Permission denied (auth issue)
|
|
52
|
+
|
|
53
|
+
For these, return error immediately with actionable suggestion.
|
|
54
|
+
|
|
55
|
+
## Tool Not Found Recovery
|
|
56
|
+
Symptoms:
|
|
57
|
+
- Tool id does not exist in registry or cache.
|
|
58
|
+
- Prefix is unknown or misspelled.
|
|
59
|
+
|
|
60
|
+
Recovery steps:
|
|
61
|
+
1. Suggest likely tool names based on prefix and category.
|
|
62
|
+
2. Provide a short list (3-5 options) from the matched category.
|
|
63
|
+
3. If prefix unknown, suggest known prefixes.
|
|
64
|
+
4. Offer to run discovery or refresh cache.
|
|
65
|
+
|
|
66
|
+
Template:
|
|
67
|
+
```
|
|
68
|
+
Error: Tool not found: <tool-id>
|
|
69
|
+
Suggestions: <tool-a>, <tool-b>, <tool-c>
|
|
70
|
+
Next: confirm the intended tool or run /agent-skill-refresh.
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Execution Failure Handling
|
|
74
|
+
Symptoms:
|
|
75
|
+
- Tool exists but returns error.
|
|
76
|
+
- Element not found, API error, invalid resource.
|
|
77
|
+
|
|
78
|
+
Recovery steps:
|
|
79
|
+
1. Report the error message verbatim.
|
|
80
|
+
2. Include context (tool name, key params).
|
|
81
|
+
3. Propose next actions (snapshot, retry, refine filters).
|
|
82
|
+
4. Avoid re-running without user confirmation.
|
|
83
|
+
|
|
84
|
+
Template:
|
|
85
|
+
```
|
|
86
|
+
Error: <message>
|
|
87
|
+
Tool: <tool-id>
|
|
88
|
+
Params: <key params>
|
|
89
|
+
Suggestions:
|
|
90
|
+
1) <action>
|
|
91
|
+
2) <action>
|
|
92
|
+
Next: confirm retry or provide new parameters.
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Timeout Handling
|
|
96
|
+
Symptoms:
|
|
97
|
+
- Tool exceeds configured timeout.
|
|
98
|
+
- Partial output may be returned.
|
|
99
|
+
|
|
100
|
+
Recovery steps:
|
|
101
|
+
1. Report timeout duration.
|
|
102
|
+
2. If partial results exist, summarize them.
|
|
103
|
+
3. Suggest narrower scope or smaller payload.
|
|
104
|
+
4. Offer retry with adjusted parameters.
|
|
105
|
+
|
|
106
|
+
Template:
|
|
107
|
+
```
|
|
108
|
+
Timeout: <tool-id> after <ms>ms
|
|
109
|
+
Partial: <summary or none>
|
|
110
|
+
Suggestions: narrow scope, reduce output, retry
|
|
111
|
+
Next: confirm retry with new parameters
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Cache Missing Recovery
|
|
115
|
+
Symptoms:
|
|
116
|
+
- `.opencode/agent-skill-tools.json` missing.
|
|
117
|
+
- Cache file invalid or unreadable.
|
|
118
|
+
|
|
119
|
+
Recovery steps:
|
|
120
|
+
1. Inform that cache is missing or invalid.
|
|
121
|
+
2. Recommend /agent-skill-refresh to regenerate.
|
|
122
|
+
3. Proceed with dynamic tool discovery if possible.
|
|
123
|
+
|
|
124
|
+
Template:
|
|
125
|
+
```
|
|
126
|
+
Cache missing or invalid at .opencode/agent-skill-tools.json
|
|
127
|
+
Suggestion: run /agent-skill-refresh
|
|
128
|
+
Fallback: dynamic discovery enabled
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Invalid Parameters
|
|
132
|
+
Symptoms:
|
|
133
|
+
- Required parameters missing.
|
|
134
|
+
- Parameter type mismatch.
|
|
135
|
+
|
|
136
|
+
Recovery steps:
|
|
137
|
+
1. State which parameters are missing or invalid.
|
|
138
|
+
2. Show expected parameter names and types.
|
|
139
|
+
3. Ask for clarification or corrected values.
|
|
140
|
+
|
|
141
|
+
Template:
|
|
142
|
+
```
|
|
143
|
+
Error: invalid parameters for <tool-id>
|
|
144
|
+
Missing: <param-a>, <param-b>
|
|
145
|
+
Expected: <param-a: string>, <param-b: number>
|
|
146
|
+
Next: provide missing values
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Partial Success Handling
|
|
150
|
+
Symptoms:
|
|
151
|
+
- Tool completes with warnings.
|
|
152
|
+
- Mixed success in batch operations.
|
|
153
|
+
|
|
154
|
+
Recovery steps:
|
|
155
|
+
1. Report success items and failures separately.
|
|
156
|
+
2. Provide counts and identifiers.
|
|
157
|
+
3. Suggest retry for failed subset only.
|
|
158
|
+
|
|
159
|
+
Template:
|
|
160
|
+
```
|
|
161
|
+
Partial success: 3 succeeded, 2 failed
|
|
162
|
+
Succeeded: [id1, id2, id3]
|
|
163
|
+
Failed: [id4, id5]
|
|
164
|
+
Next: retry failed items with adjusted params
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Fallback Procedures
|
|
168
|
+
Fallback hierarchy:
|
|
169
|
+
1. Cached tool lookup (fast)
|
|
170
|
+
2. Dynamic tool registry lookup
|
|
171
|
+
3. Ask for clarification or alternative approach
|
|
172
|
+
|
|
173
|
+
For browser tools:
|
|
174
|
+
- If element not found, use take_snapshot to refresh uids.
|
|
175
|
+
- If click fails repeatedly, try scroll or hover before clicking.
|
|
176
|
+
|
|
177
|
+
For GitHub tools:
|
|
178
|
+
- If repository not found, verify owner/repo spelling.
|
|
179
|
+
- If rate-limited, reduce query frequency and request retry later.
|
|
180
|
+
|
|
181
|
+
For GraphQL tools:
|
|
182
|
+
- If schema fetch fails, verify endpoint and auth.
|
|
183
|
+
- If type not found, re-check filter_types output.
|
|
184
|
+
|
|
185
|
+
For Docs tools:
|
|
186
|
+
- If library resolution fails, request full package name.
|
|
187
|
+
- If query returns no matches, broaden query terms.
|
|
188
|
+
|
|
189
|
+
## Error Response Templates
|
|
190
|
+
Generic error:
|
|
191
|
+
```
|
|
192
|
+
Status: failure
|
|
193
|
+
Error: <message>
|
|
194
|
+
Tool: <tool-id>
|
|
195
|
+
Context: <key params>
|
|
196
|
+
Next: <suggested action>
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Browser error:
|
|
200
|
+
```
|
|
201
|
+
Status: failure
|
|
202
|
+
Error: element not found
|
|
203
|
+
Tool: MetaMCP_chrome-devtools__click
|
|
204
|
+
Params: uid=<uid>
|
|
205
|
+
Next: run take_snapshot to refresh uids
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
GitHub error:
|
|
209
|
+
```
|
|
210
|
+
Status: failure
|
|
211
|
+
Error: 404 repository not found
|
|
212
|
+
Tool: MetaMCP_github-zengaming__get_pull_request
|
|
213
|
+
Params: owner=<owner>, repo=<repo>, pull_number=<n>
|
|
214
|
+
Next: confirm repository name or access rights
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
GraphQL error:
|
|
218
|
+
```
|
|
219
|
+
Status: failure
|
|
220
|
+
Error: field not found
|
|
221
|
+
Tool: MetaMCP_graphql-tools__get_field_details
|
|
222
|
+
Params: field_name=<field>
|
|
223
|
+
Next: list available fields with filter_queries
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Docs error:
|
|
227
|
+
```
|
|
228
|
+
Status: failure
|
|
229
|
+
Error: library not resolved
|
|
230
|
+
Tool: MetaMCP_context7__resolve-library-id
|
|
231
|
+
Params: libraryName=<name>
|
|
232
|
+
Next: provide full package name or repo
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
## Recovery Decision Tree
|
|
236
|
+
Decision tree (text form):
|
|
237
|
+
1. Is tool id invalid?
|
|
238
|
+
- Yes -> suggest alternatives and refresh cache.
|
|
239
|
+
- No -> continue.
|
|
240
|
+
2. Did execution timeout?
|
|
241
|
+
- Yes -> summarize partial output and retry with narrower scope.
|
|
242
|
+
- No -> continue.
|
|
243
|
+
3. Did execution return a known error?
|
|
244
|
+
- Yes -> apply category-specific recovery.
|
|
245
|
+
- No -> continue.
|
|
246
|
+
4. Are params missing/invalid?
|
|
247
|
+
- Yes -> request corrected params.
|
|
248
|
+
- No -> continue.
|
|
249
|
+
5. Is cache missing?
|
|
250
|
+
- Yes -> recommend /agent-skill-refresh and use dynamic discovery.
|
|
251
|
+
- No -> continue.
|
|
252
|
+
6. Unknown failure
|
|
253
|
+
- Provide generic error template and ask for clarification.
|
|
254
|
+
|
|
255
|
+
## Recovery Checklist
|
|
256
|
+
- [ ] Identify error class
|
|
257
|
+
- [ ] Provide concise error summary
|
|
258
|
+
- [ ] Include tool id and key params
|
|
259
|
+
- [ ] Suggest concrete next steps
|
|
260
|
+
- [ ] Avoid automatic retries without confirmation
|