Skip to main content
Glama
daikw

Notes MCP Server

by daikw

add-note

Create and store a new note by specifying its name and content, enabling quick organization and retrieval within the Notes MCP Server's streamlined storage system.

Instructions

Add a new note

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYes
nameYes

Implementation Reference

  • The @server.call_tool() decorated handler function that executes the 'add-note' tool logic: extracts name and content from arguments, stores in global notes dict, sends resource change notification, and returns confirmation text.
    @server.call_tool()
    async def handle_call_tool(
        name: str, arguments: dict | None
    ) -> list[types.TextContent | types.ImageContent | types.EmbeddedResource]:
        """
        Handle tool execution requests.
        Tools can modify server state and notify clients of changes.
        """
        if name != "add-note":
            raise ValueError(f"Unknown tool: {name}")
    
        if not arguments:
            raise ValueError("Missing arguments")
    
        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}",
            )
        ]
  • JSON Schema defining the input parameters for the 'add-note' tool: required 'name' and 'content' as strings.
    inputSchema={
        "type": "object",
        "properties": {
            "name": {"type": "string"},
            "content": {"type": "string"},
        },
        "required": ["name", "content"],
    },
  • The 'add-note' tool is registered in the @server.list_tools() handler by returning a types.Tool instance with its name, description, and schema.
    return [
        types.Tool(
            name="add-note",
            description="Add a new note",
            inputSchema={
                "type": "object",
                "properties": {
                    "name": {"type": "string"},
                    "content": {"type": "string"},
                },
                "required": ["name", "content"],
            },
        )
    ]
  • Global notes dictionary used by the 'add-note' tool to store note name-content pairs.
    # Store notes as a simple key-value dict to demonstrate state management
    notes: dict[str, str] = {}
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states 'Add a new note' without explaining what 'add' entails (e.g., creation, mutation, permissions, side effects, or response format), making it insufficient for a tool with potential write operations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with 'Add a new note', a single sentence that directly states the tool's purpose without any unnecessary words. It's front-loaded and efficient, though this brevity contributes to other deficiencies.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and 0% schema description coverage for a 2-parameter tool that likely performs a write operation, the description is completely inadequate. It lacks essential details about behavior, parameters, and outcomes needed for effective tool use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description provides no information about the parameters (content and name). It doesn't explain what these parameters mean, their expected formats, or how they relate to adding a note, failing to compensate for the lack of schema documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Add a new note' clearly states the action (add) and resource (note), but it's vague about what constitutes a note and lacks specificity about scope or format. Without sibling tools, differentiation isn't needed, but the purpose remains somewhat generic.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool, such as prerequisites, context, or alternatives. The description doesn't mention any constraints or typical use cases, leaving the agent without usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/daikw/mcp-server-on-raspi'

If you have feedback or need assistance with the MCP directory API, please join our Discord server