Skip to Content
ReferenceArcade MCPPythonTypes

Types

Core Pydantic models and enums for the protocol shapes.

arcade_mcp_server.types

CallToolResult

Bases: Result

A list of content objects that represent the unstructured result of the call.

content (instance-attribute)

An optional JSON object that represents the structured result of the call.

SessionMessage

Type: dataclass

Wrapper for messages in transport sessions.

Examples

Constructing a JSON-RPC request and response model

Python
from arcade_mcp_server.types import JSONRPCRequest, JSONRPCResponse req = JSONRPCRequest(id=1, method="ping", params={}) res = JSONRPCResponse(id=req.id, result={}) print(req.model_dump_json()) print(res.model_dump_json())

Building a tools/call request and examining result shape

Python
from arcade_mcp_server.types import CallToolRequest, CallToolResult, TextContent call = CallToolRequest( id=2, method="tools/call", params={ "name": "Toolkit.tool", "arguments": {"text": "hello"}, }, ) # Result would typically be produced by the server: result = CallToolResult( content=[TextContent(type="text", text="Echo: hello")], structuredContent={"result": "Echo: hello"}, isError=False )
Last updated on