feat(tools): add get_proxy_documentation tool

Add a new MCP tool that returns complete documentation for the HTTP
proxy API. This enables agents to get all the information they need
to construct valid proxy requests when writing scripts.

The tool is stateless and returns a static documentation dict
describing endpoints, methods, authentication, and example usage.
This commit is contained in:
2026-01-02 13:39:02 -05:00
parent c65ec0489c
commit a7bb11d765
2 changed files with 122 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
import pytest
from grist_mcp.tools.session import get_proxy_documentation
@pytest.mark.asyncio
async def test_get_proxy_documentation_returns_complete_spec():
result = await get_proxy_documentation()
assert "description" in result
assert "endpoint" in result
assert result["endpoint"] == "POST /api/v1/proxy"
assert "authentication" in result
assert "methods" in result
assert "add_records" in result["methods"]
assert "get_records" in result["methods"]
assert "example_script" in result