|
| struct mcp_resource * | add_resource (const char *uri, const char *name, const char *description, const char *mime_type, mcp_resource_fn callback) |
| | Register an exact virtual URI and its read callback during startup.
|
| |
| size_t | mcp_resource_index_height (void) |
| | Read the height of the resource-URI lookup index for diagnostics.
|
| |
| size_t | mcp_resource_lookup_steps (void) |
| | Read the comparison count of the latest resources/read lookup.
|
| |
| int | set_tool_callback (struct tool *tool, mcp_tool_fn callback) |
| | Bind the callback invoked when a client calls a registered tool.
|
| |
| struct tool * | find_tool (const char *name) |
| | Look up a registered tool by exact, case-sensitive name.
|
| |
| size_t | mcp_tool_lookup_steps (void) |
| | Read the comparison count of the latest tool-name lookup.
|
| |
| size_t | mcp_tool_index_height (void) |
| | Read the height of the tool-name lookup index for diagnostics.
|
| |
| int | mcp_prepare (void) |
| | Finish startup by caching discovery schemas and response templates.
|
| |
| void * | mcp_arena_alloc (size_t size) |
| | Allocate aligned storage from the current request arena.
|
| |
| char * | mcp_arena_strdup (const char *text) |
| | Copy a null-terminated string into the current request arena.
|
| |
| size_t | mcp_arena_used (void) |
| | Read current arena consumption, including alignment padding.
|
| |
| size_t | mcp_arena_high_water (void) |
| | Read the arena's recorded high-water mark.
|
| |
| size_t | mcp_heap_allocations (void) |
| | Count allocation attempts through the installed cJSON heap allocator.
|
| |
| void | dispatch (const char *line, int fd) |
| | Dispatch one JSON-RPC message through the default transport hook.
|
| |
| void | dispatch_with_sender (const char *line, int fd, mcp_send_fn send) |
| | Dispatch one JSON-RPC message through an application-provided sender.
|
| |
| void | add_argument (struct tool *tool, const char *name, enum type type, const char *description) |
| | Append one required argument to a tool's discovery schema.
|
| |
| struct tool * | add_tool (const char *name, const char *description) |
| | Register a tool name and its client-visible description during startup.
|
| |
| void | free_tools (void) |
| | Release tool/resource registries and cached responses; reopen registration.
|
| |
Public API for the portable C MCP server.