Skip to main content
Glama
cwente25

Knowledge Base MCP Server

by cwente25

get_note

Retrieve the full content of a specific note from your knowledge base by providing its category path and title.

Instructions

Retrieve the full content of a specific note

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
category_pathYesCategory path (e.g., 'work/clients/acme')
titleYesNote title (can use full filename or friendly title)

Implementation Reference

  • The handler function that executes the 'get_note' tool. It extracts arguments, calls storage.get_note, formats the note with metadata, and returns formatted TextContent.
    async def handle_get_note(arguments: dict) -> list[TextContent]:
        """Handle get_note tool call."""
        try:
            category_path = arguments["category_path"]
            title = arguments["title"]
    
            # Get note
            note = storage.get_note(category_path, title)
    
            # Format output with frontmatter
            output = f"# {note.title}\n\n"
            output += f"**Category:** {note.category or 'root'}\n"
            output += f"**Tags:** {', '.join(note.frontmatter.tags) if note.frontmatter.tags else 'none'}\n"
            output += f"**Date:** {note.frontmatter.date}\n"
    
            if note.frontmatter.updated:
                output += f"**Updated:** {note.frontmatter.updated}\n"
    
            # Add metadata if any
            if note.frontmatter.metadata:
                output += "\n**Additional Info:**\n"
                for key, value in note.frontmatter.metadata.items():
                    output += f"- {key}: {value}\n"
    
            output += f"\n---\n\n{note.content}"
    
            return [TextContent(type="text", text=output)]
        except (NoteNotFoundError, StorageError) as e:
            return [TextContent(type="text", text=str(e))]
        except Exception as e:
            return [TextContent(type="text", text=f"❌ Error: {str(e)}")]
  • Input schema definition for the 'get_note' tool, specifying required category_path and title parameters.
    Tool(
        name="get_note",
        description="Retrieve the full content of a specific note",
        inputSchema={
            "type": "object",
            "properties": {
                "category_path": {
                    "type": "string",
                    "description": "Category path (e.g., 'work/clients/acme')",
                },
                "title": {
                    "type": "string",
                    "description": "Note title (can use full filename or friendly title)",
                },
            },
            "required": ["category_path", "title"],
        },
    ),
  • Dispatch logic in the main call_tool function that routes 'get_note' calls to the handle_get_note handler.
    elif name == "get_note":
        return await handle_get_note(arguments)
  • Core storage method that retrieves a note by computing the file path and parsing the markdown file into a Note object. Called by the handler.
    def get_note(self, category_path: str, title: str) -> Note:
        """
        Retrieve a note by category path and title.
    
        Args:
            category_path: Category path (e.g., "work/clients/acme")
            title: Note title (can be friendly name or filename)
    
        Returns:
            Note object
    
        Raises:
            NoteNotFoundError: If note doesn't exist
        """
        normalized = normalize_path(category_path)
        file_path = self._get_note_path(normalized, title)
    
        if not file_path.exists():
            raise NoteNotFoundError(
                f"❌ Error: Note '{title}' not found in {normalized or 'root'}/\n"
                f"💡 Tip: Use search_notes to find existing notes"
            )
    
        return self._parse_note_file(file_path)
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves content but does not mention potential errors (e.g., if the note doesn't exist), permissions required, rate limits, or the format of the returned content. This leaves significant gaps in understanding how the tool behaves beyond its basic function.

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 a single, direct sentence that efficiently conveys the core purpose without any unnecessary words. It is front-loaded with the key action and resource, making it highly concise and well-structured for quick understanding.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete for a tool that retrieves data. It does not explain what is returned (e.g., note content, metadata, error handling), which is critical for an agent to use the tool effectively. The high schema coverage helps with inputs, but the overall context is insufficient.

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

Parameters3/5

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

The input schema has 100% description coverage, clearly documenting both required parameters ('category_path' and 'title') with examples. The description does not add any additional meaning beyond what the schema provides, such as explaining how these parameters uniquely identify a note or detailing edge cases, so it meets the baseline for high schema coverage.

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

Purpose4/5

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

The description clearly states the action ('retrieve') and resource ('full content of a specific note'), making the purpose unambiguous. However, it does not explicitly differentiate from sibling tools like 'list_notes' or 'search_notes', which might retrieve multiple notes or partial content, so it falls short of a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives such as 'list_notes' for browsing or 'search_notes' for filtering. It lacks context on prerequisites or exclusions, leaving the agent to infer usage from the purpose alone.

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

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/cwente25/KnowledgeBaseMCP'

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