{"at":"2026-11-22T23:34:50.181Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-22T23:34:50.680Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-22T23:34:50.781Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-22T23:34:51.229Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"prompts":{"listChanged":true},"tools":{"listChanged":true}},"protocolVersion":"2025-11-25","serverInfo":{"name":"mtasa-docs","version":"1.0.3"}}}}
{"at":"2026-11-22T23:34:51.229Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-22T23:34:51.229Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-22T23:34:51.232Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"description":"Primary discovery tool. Search MTA:SA functions and events by name or keyword before coding. Returns canonical function names with side/category so LLMs can reliably chain into docs tools.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"limit":{"default":30,"description":"Maximum number of results","maximum":200,"minimum":1,"type":"integer"},"query":{"description":"Function name or partial name to search for","type":"string"},"side":{"description":"Filter by client-side, server-side, or shared functions","enum":["client","server","shared"],"type":"string"}},"required":["query"],"type":"object"},"name":"search_functions"},{"description":"Event discovery tool. Search MTA:SA client/server events only (not regular functions), then chain into docs tools with exact event names.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"limit":{"default":30,"description":"Maximum number of results","maximum":200,"minimum":1,"type":"integer"},"query":{"description":"Event name or keyword to search for","type":"string"},"side":{"description":"Filter by client-side or server-side events","enum":["client","server"],"type":"string"}},"required":["query"],"type":"object"},"name":"search_events"},{"description":"Task-to-functions matcher. Use this FIRST when user intent is high-level (e.g., 'vehicle dealership', 'login panel'). Returns ranked MTA:SA functions/events optimized for follow-up documentation retrieval.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"limit":{"default":10,"description":"Maximum number of suggestions","maximum":100,"minimum":1,"type":"integer"},"task_description":{"description":"Description of what you want to accomplish (e.g., 'login system', 'spawn vehicle', 'create gui window')","type":"string"}},"required":["task_description"],"type":"object"},"name":"find_functions_for_task"},{"description":"Task-to-events matcher. Use when you need event names for handlers/triggers (e.g., resource lifecycle, player joins, marker hits). Returns ranked MTA:SA events only.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"limit":{"default":10,"description":"Maximum number of suggestions","maximum":100,"minimum":1,"type":"integer"},"side":{"description":"Filter by client-side or server-side events","enum":["client","server"],"type":"string"},"task_description":{"description":"Description of the event workflow you need (e.g., 'when player joins', 'resource start', 'on marker hit')","type":"string"}},"required":["task_description"],"type":"object"},"name":"find_events_for_task"},{"description":"Fetch authoritative docs for exactly ONE MTA:SA function/event by canonical name. Preferred over manual web browsing. For multiple names, use get_multiple_function_docs in one call.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"function_name":{"description":"Function/event name (case-insensitive)","type":"string"},"include_optional_arguments":{"default":false,"description":"Whether to include optional arguments in the parameters section","type":"boolean"},"use_cache":{"default":true,"description":"Whether to use cached documentation","type":"boolean"}},"required":["function_name"],"type":"object"},"name":"get_function_docs"},{"description":"Get only code examples for one function/event after docs lookup. Use when writing implementation snippets and tests.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"function_name":{"description":"Function/event name (case-insensitive)","type":"string"}},"required":["function_name"],"type":"object"},"name":"get_function_examples"},{"description":"Batch docs retrieval for implementation phase. Provide exact function/event names (ideally from search/find tools) and get combined authoritative docs in one response.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"function_names":{"description":"Array of function/event names to fetch","items":{"type":"string"},"maxItems":25,"minItems":1,"type":"array"},"include_examples":{"default":true,"description":"Whether to include code examples","type":"boolean"},"include_optional_arguments":{"default":false,"description":"Whether to include optional arguments in each parameters section","type":"boolean"}},"required":["function_names"],"type":"object"},"name":"get_multiple_function_docs"},{"description":"Enumerate canonical function/event names in a category. Useful for discovery when query terms are vague.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"category":{"description":"The category to list functions from","enum":["Lua Keywords","Standard Lua Functions","Data Types/Classes","MTA:SA Shared Functions","Client Functions","Server Functions","Client Events","Server Events"],"type":"string"},"limit":{"default":100,"description":"Maximum number of results to return","maximum":500,"minimum":1,"type":"integer"}},"required":["category"],"type":"object"},"name":"list_functions_by_category"},{"description":"Get statistics about the MTA:SA documentation cache.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"get_cache_stats"},{"description":"Planner tool that tells LLMs exactly which mtasa-docs tools to call next for a given task. Use this to enforce MCP-first workflows and avoid manual wiki scraping.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"known_function_names":{"default":[],"description":"Function names already known in the conversation","items":{"type":"string"},"type":"array"},"task_description":{"description":"What the user wants to build or debug","type":"string"}},"required":["task_description"],"type":"object"},"name":"recommend_doc_workflow"},{"description":"Clear the MTA:SA documentation cache for a specific function or all functions.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"function_name":{"description":"Function name to clear cache for, or 'all' to clear everything","type":"string"}},"required":["function_name"],"type":"object"},"name":"clear_cache"}]}}}
