Skip to main content
Glama
binodrajpandey

MCP Server Example

save_note

Store notes with names and content in the MCP Server Example's storage system for organization and retrieval.

Instructions

Save a note with a given name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
contentYes

Implementation Reference

  • server.py:32-36 (handler)
    The save_note tool handler function that saves a note to an in-memory dictionary. Takes a name and content as parameters, stores the note, and returns a confirmation message.
    @mcp.tool()
    def save_note(name: str, content: str) -> str:
        """Save a note with a given name."""
        notes[name] = content
        return f"Note '{name}' saved."
  • server.py:32-36 (registration)
    The save_note tool is registered with the MCP server using the @mcp.tool() decorator, making it available as an MCP tool that Claude can invoke.
    @mcp.tool()
    def save_note(name: str, content: str) -> str:
        """Save a note with a given name."""
        notes[name] = content
        return f"Note '{name}' saved."
  • The save_note tool schema is defined via Python type hints (name: str, content: str) -> str and a docstring that describes the tool's purpose.
    def save_note(name: str, content: str) -> str:
        """Save a note with a given name."""
Install Server

Other 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/binodrajpandey/mcp-example'

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