Skip to main content
Glama
sayranovv
by sayranovv

list_notes

Retrieve all stored notes with optional filtering by tag to organize and access your Markdown documentation efficiently.

Instructions

Get a list of all notes

Args: tag: Optional tag filter

Returns: List of notes with titles and dates

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The core handler function for the 'list_notes' MCP tool. It scans the notes directory, parses each Markdown note for title, tags, and creation date, filters by optional tag parameter, and returns a formatted list of notes. Registered via @mcp.tool() decorator.
    @mcp.tool()
    def list_notes(tag: str = "") -> str:
        """
        Get a list of all notes
        
        Args:
            tag: Optional tag filter
        
        Returns:
            List of notes with titles and dates
        """
        ensure_notes_dir()
        
        notes = []
        for filename in sorted(os.listdir(NOTES_DIR), reverse=True):
            if filename.endswith('.md'):
                filepath = os.path.join(NOTES_DIR, filename)
                with open(filepath, "r", encoding="utf-8") as f:
                    content = f.read()
                    title_match = re.search(r'^# (.+)$', content, re.MULTILINE)
                    title = title_match.group(1) if title_match else filename
                    
                    if tag:
                        tags_match = re.search(r'\*\*Tags:\*\* (.+)$', content, re.MULTILINE)
                        if not tags_match or tag.lower() not in tags_match.group(1).lower():
                            continue
                    
                    date_match = re.search(r'\*\*Created:\*\* (.+)$', content, re.MULTILINE)
                    date = date_match.group(1) if date_match else "Unknown"
                    
                    notes.append(f"- [{filename}] {title} (Created: {date})")
        
        if not notes:
            return "No notes found" + (f" with tag '{tag}'" if tag else "")
        
        return "\n".join(notes)
Behavior2/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. It mentions returning a list of notes with titles and dates, but doesn't disclose behavioral traits such as pagination, sorting, permissions needed, or rate limits. For a list operation without annotations, this is inadequate.

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

Conciseness4/5

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

The description is appropriately sized and front-loaded with the main purpose, followed by structured sections for args and returns. It avoids unnecessary words, though the structure could be more integrated (e.g., combining description with parameter info).

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

Completeness3/5

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

Given the tool's low complexity (one optional parameter) and the presence of an output schema (which handles return values), the description is somewhat complete but lacks context on behavior and usage. It covers basics but misses guidance on when to use versus siblings and operational details.

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

Parameters4/5

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

The description adds meaning beyond the input schema by explaining that 'tag' is an 'Optional tag filter', which clarifies its purpose. With 0% schema description coverage and only one parameter, this compensates well, though it could provide more detail on tag format or examples.

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 states 'Get a list of all notes' which clearly indicates the verb (get/list) and resource (notes), but it doesn't differentiate from sibling tools like 'search_notes'. The purpose is understandable but lacks sibling differentiation, making it vague in context.

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 versus alternatives like 'search_notes'. The description mentions an optional tag filter, but it doesn't explain when this tool is appropriate compared to other note-related tools, leaving usage unclear.

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/sayranovv/notes-mcp-server'

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