get_tool_context
Retrieve complete context including rules, syntax, and preferences for any tool to maintain consistent settings across chat sessions without manual reconfiguration.
Instructions
Get complete context (rules, syntax, preferences) for a specific tool
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tool_name | Yes | Tool name or category (e.g. "git", "dokuwiki", "terraform") |
Implementation Reference
- src/server/index.ts:212-225 (handler)The request handler logic for 'get_tool_context' tool in the MCP server. It uses the engine to match contexts for the given tool_name and returns them.
case 'get_tool_context': { const toolName = String(args?.['tool_name'] ?? ''); if (!toolName) { return { content: [{ type: 'text', text: 'Error: tool_name is required' }] }; } const matches = engine.matchContexts({ tool: toolName }); if (matches.length === 0) { return { content: [{ type: 'text', text: `No context found for tool: ${toolName}` }], }; } const merged = matches.map((m) => m.context); return { content: [{ type: 'text', text: JSON.stringify(merged, null, 2) }] }; } - src/server/index.ts:65-79 (registration)The definition and registration of the 'get_tool_context' tool in the MCP server list tools handler.
{ name: 'get_tool_context', description: 'Get complete context (rules, syntax, preferences) for a specific tool', inputSchema: { type: 'object' as const, properties: { tool_name: { type: 'string', description: 'Tool name or category (e.g. "git", "dokuwiki", "terraform")', }, }, required: ['tool_name'], }, },