MCP Tools
Model Context Protocol tools exposed by NarraNexus modules
Overview
NarraNexus uses the Model Context Protocol (MCP) as its tool execution framework. Each module registers tools via the fastmcp library, making them available to the LLM during the Tool Execution step of the agent pipeline. MCP provides a standardized interface for tool discovery, invocation, and result handling.
How MCP Works
During LLM Reasoning, the model may decide to invoke a tool to complete a task. The tool call is dispatched to the appropriate module's MCP handler, which executes the operation and returns a structured result. The result is fed back to the LLM for further reasoning. This loop continues until the model produces a final response without tool calls.
Tool Discovery
Tools are automatically registered when modules are loaded. The LLM receives a tool manifest describing all available tools, their parameters, and their descriptions. This allows the model to select the appropriate tool for each situation. The manifest is regenerated when modules are added or removed.
Module Tool Summary
| Module | Tools | Description |
|---|---|---|
| Memory | memory_store, memory_search, memory_forget | Long-term memory operations |
| Awareness | awareness_analyze, awareness_entities | Context analysis |
| Chat | chat_history, chat_search | Conversation access |
| Social Network | social_lookup, social_connect, social_graph | Relationship management |
| Jobs | jobs_schedule, jobs_status, jobs_cancel | Task scheduling |
| RAG | rag_upload, rag_search, rag_list | Document retrieval |
| Skills | skills_search, skills_install, skills_list | Capability marketplace |
| Matrix | matrix_send, matrix_create_room, matrix_history | Agent messaging |
| Event Memory | event_store, event_search, event_timeline | Episode management |
Custom Tools
Developers can create custom MCP tools by defining functions decorated with @mcp.tool() from the fastmcp library. Custom tools are registered with the runtime during module initialization and become immediately available to the LLM.