sjtu_models
Retrieve the list of available models from the SJTU Zhiyuan No.1 API for use in Claude Code and Codex.
Instructions
List available models from the SJTU endpoint.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "sjtu_models"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/sjtu_mcp/server.py:62-65 (handler)The tool handler function for 'sjtu_models'. Decorated with @mcp.tool(), it calls client.list_models() to fetch available models from the SJTU API.
@mcp.tool() async def sjtu_models() -> list[dict[str, Any]]: """List available models from the SJTU endpoint.""" return await client.list_models() - src/sjtu_mcp/server.py:62-62 (registration)Registration of 'sjtu_models' as an MCP tool via the @mcp.tool() decorator on the FastMCP instance 'mcp'.
@mcp.tool() - src/sjtu_mcp/server.py:63-63 (schema)The function signature shows no input parameters and returns a list of dictionaries (model data).
async def sjtu_models() -> list[dict[str, Any]]: - src/sjtu_mcp/client.py:35-36 (helper)The SjtuClient.list_models() helper method that makes the HTTP GET request to /models endpoint and extracts the 'data' field from the JSON response.
data = response.json() return data.get("data", [])