feat(mcp): add describe_tools and annotate_tool functionality
* Implement DescribeTool for listing available MCP tools with annotations. * Add UpsertToolAnnotation and GetToolAnnotations methods for managing tool notes. * Create tool_annotations table for storing tool usage notes.
This commit is contained in:
26
README.md
26
README.md
@@ -61,6 +61,32 @@ A Go MCP server for capturing and retrieving thoughts, memory, and project conte
|
||||
| `remove_project_guardrail` | Unlink an agent guardrail from a project; pass `project` explicitly if your client does not preserve MCP sessions |
|
||||
| `list_project_guardrails` | List all guardrails linked to a project; pass `project` explicitly if your client does not preserve MCP sessions |
|
||||
| `get_version_info` | Return the server build version information, including version, tag name, commit, and build date |
|
||||
| `describe_tools` | List all available MCP tools with names, descriptions, categories, and model-authored usage notes; call this at the start of a session to orient yourself |
|
||||
| `annotate_tool` | Persist your own usage notes for a specific tool; notes are returned by `describe_tools` in future sessions |
|
||||
|
||||
## Self-Documenting Tools
|
||||
|
||||
AMCS includes a built-in tool directory that models can read and annotate.
|
||||
|
||||
**`describe_tools`** returns every registered tool with its name, description, category, and any model-written notes. Call it with no arguments to get the full list, or filter by category:
|
||||
|
||||
```json
|
||||
{ "category": "thoughts" }
|
||||
```
|
||||
|
||||
Available categories: `system`, `thoughts`, `projects`, `files`, `admin`, `household`, `maintenance`, `calendar`, `meals`, `crm`, `skills`, `chat`, `meta`.
|
||||
|
||||
**`annotate_tool`** lets a model write persistent usage notes against a tool name. Notes survive across sessions and are returned by `describe_tools`:
|
||||
|
||||
```json
|
||||
{ "tool_name": "capture_thought", "notes": "Always pass project explicitly — session state is not reliable in this client." }
|
||||
```
|
||||
|
||||
Pass an empty string to clear notes. The intended workflow is:
|
||||
|
||||
1. At the start of a session, call `describe_tools` to discover tools and read accumulated notes.
|
||||
2. As you learn something non-obvious about a tool — a gotcha, a workflow pattern, a required field ordering — call `annotate_tool` to record it.
|
||||
3. Future sessions receive the annotation automatically via `describe_tools`.
|
||||
|
||||
## MCP Error Contract
|
||||
|
||||
|
||||
Reference in New Issue
Block a user