add-note
Store and organize notes by adding name and content to the Soduku Solver MCP Server’s note storage system for efficient retrieval and summarization.
Instructions
Add a new note
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| name | Yes |
Implementation Reference
- src/sodukusolver/server.py:187-206 (handler)The handler logic for the 'add-note' tool within the call_tool function. It extracts 'name' and 'content' from arguments, stores the note in the global 'notes' dictionary, notifies clients of resource changes, and returns a confirmation message.if name == "add-note": note_name = arguments.get("name") content = arguments.get("content") if not note_name or not content: raise ValueError("Missing name or content") # Update server state notes[note_name] = content # Notify clients that resources have changed await server.request_context.session.send_resource_list_changed() return [ types.TextContent( type="text", text=f"Added note '{note_name}' with content: {content}", ) ]
- src/sodukusolver/server.py:128-139 (registration)Registration of the 'add-note' tool in the list_tools() function, specifying the tool name, description, and input schema.types.Tool( name="add-note", description="Add a new note", inputSchema={ "type": "object", "properties": { "name": {"type": "string"}, "content": {"type": "string"}, }, "required": ["name", "content"], }, ),
- src/sodukusolver/server.py:131-138 (schema)Input JSON schema for the 'add-note' tool, defining required 'name' and 'content' string properties.inputSchema={ "type": "object", "properties": { "name": {"type": "string"}, "content": {"type": "string"}, }, "required": ["name", "content"], },
- src/sodukusolver/server.py:10-11 (helper)Global dictionary used to store notes persistently across tool calls, directly modified by the add-note handler.# Store notes as a simple key-value dict to demonstrate state management notes: dict[str, str] = {}