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:
16
tests/unit/test_tools_session.py
Normal file
16
tests/unit/test_tools_session.py
Normal 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
|
||||
Reference in New Issue
Block a user