Register tools and optional read-only resources, then serve JSON-RPC requests. More...
Content | |
| Argument types and protocol errors | |
| Discovery schema types, opaque handles and protocol error constants. | |
| Tool registration and callbacks | |
| Describe tools for clients and bind validated inputs to callbacks. | |
| Read-only virtual resources | |
| Expose virtual text through resources/list and resources/read. | |
| Startup and request memory | |
| Prepare persistent metadata and manage bounded request storage. | |
| Request dispatch and transport | |
| Serve complete JSON-RPC messages with synchronous response delivery. | |
| Memory and index diagnostics | |
| Read counters without allocating memory. | |
| Portable serial transport | |
| Serial I/O with stdio defaults and weak functions on CMSIS boards. | |
Register tools and optional read-only resources, then serve JSON-RPC requests.
Startup metadata uses the heap. Request parsing, callback output and serialization share the bounded arena configured by C_MCP_ARENA_SIZE. Reset occurs after the synchronous sender returns. Resource support is controlled by C_MCP_ENABLE_VFS. Registration strings must remain valid and unchanged until free_tools().