-
Notifications
You must be signed in to change notification settings - Fork 307
Closed
Labels
Description
Objective
Add ToolAnnotations to all 8 MCP server tools in pkg/cli/mcp_server.go to improve LLM client understanding of tool behavior.
Context
Discussion #16774 noted that the displayDetailedToolInfo() function in the inspector already renders tool annotations, but the server tools don't define Annotations. Adding them helps LLM clients reason about tool safety, idempotency, and side effects.
Suggested Annotations
| Tool | ReadOnlyHint | IdempotentHint | DestructiveHint | OpenWorldHint |
|---|---|---|---|---|
| status | true |
true |
— | false |
| compile | false |
true |
false |
false |
| logs | true |
true |
— | true |
| audit | true |
true |
— | true |
| mcp-inspect | true |
true |
— | true |
| add | false |
false |
— | true |
| update | false |
false |
— | true |
| fix | false |
true |
false |
false |
Steps
- Open
pkg/cli/mcp_server.go - For each
mcp.AddTool()call, add anAnnotationsfield to the&mcp.Tool{}struct using the table above - Run
make fmt && make build && make test-unit
Example
mcp.AddTool(server, &mcp.Tool{
Name: "status",
Annotations: &mcp.ToolAnnotations{
ReadOnlyHint: true,
IdempotentHint: true,
OpenWorldHint: false,
},
// ...
}, handler)Files to Modify
pkg/cli/mcp_server.go
Acceptance Criteria
- All 8 tools have
Annotationsdefined - Annotations match the table above
-
make buildandmake test-unitpass
Generated by Plan Command for issue #discussion #16774
- expires on Feb 21, 2026, 9:47 PM UTC
Reactions are currently unavailable
Metadata
Metadata
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.