Skip to main content
Glama

obsidian_get_notes_info

Read-onlyIdempotent

Retrieve metadata like tags, dates, and sizes for multiple Zettelkasten notes to analyze collections and understand relationships without reading full content.

Instructions

Get metadata for multiple notes including tags, dates, and sizes.

Efficient way to get overview information about several Zettelkasten notes
without reading full content. Useful for analyzing note collections.

Args:
    params (GetNotesInfoInput): Contains:
        - filepaths (List[str]): Paths to files (max 50)

Returns:
    str: JSON array with metadata for each file
    
Example:
    Get info about all notes in a topic cluster to understand their relationships.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Main handler function that loops through filepaths, retrieves frontmatter metadata and file content length using ObsidianClient, and returns JSON array of note information.
    async def get_notes_info(params: GetNotesInfoInput) -> str:
        """Get metadata for multiple notes including tags, dates, and sizes.
        
        Efficient way to get overview information about several Zettelkasten notes
        without reading full content. Useful for analyzing note collections.
        
        Args:
            params (GetNotesInfoInput): Contains:
                - filepaths (List[str]): Paths to files (max 50)
        
        Returns:
            str: JSON array with metadata for each file
            
        Example:
            Get info about all notes in a topic cluster to understand their relationships.
        """
        results = []
        
        for filepath in params.filepaths:
            try:
                # Get frontmatter
                frontmatter = await obsidian_client.get_file_frontmatter(filepath)
                
                # Get file content for size
                content = await obsidian_client.read_file(filepath)
                
                results.append({
                    "filepath": filepath,
                    "success": True,
                    "tags": frontmatter.get("tags", []),
                    "created": frontmatter.get("created", None),
                    "modified": frontmatter.get("modified", None),
                    "size_chars": len(content),
                    "has_frontmatter": bool(frontmatter)
                })
                
            except ObsidianAPIError as e:
                results.append({
                    "filepath": filepath,
                    "success": False,
                    "error": str(e)
                })
        
        return json.dumps(results, indent=2)
  • Pydantic input model defining the expected parameters: a list of 1-50 filepaths.
    class GetNotesInfoInput(BaseModel):
        """Input for getting metadata about notes."""
        model_config = ConfigDict(str_strip_whitespace=True, extra='forbid')
        
        filepaths: List[str] = Field(
            description="List of file paths to get info about",
            min_items=1,
            max_items=50
        )
  • MCP tool registration decorator binding the get_notes_info function to the tool name 'obsidian_get_notes_info' with annotations.
    @mcp.tool(
        name="obsidian_get_notes_info",
        annotations={
            "title": "Get Notes Metadata",
            "readOnlyHint": True,
            "destructiveHint": False,
            "idempotentHint": True,
            "openWorldHint": False
        }
    )
Behavior4/5

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

Annotations already provide readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=false. The description adds valuable context beyond this: it clarifies the tool's efficiency ('Efficient way'), scope ('without reading full content'), and practical use case ('analyzing note collections'), which helps the agent understand behavioral traits not covered by annotations.

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 well-structured and front-loaded with the core purpose, followed by usage context, parameter details, return value, and an example. Every sentence adds value without redundancy, making it efficient and easy to parse.

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

Completeness5/5

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

Given the tool's moderate complexity (single parameter, read-only operation), the description is complete. It covers purpose, usage, parameters, returns (noting JSON format), and includes an example. With annotations providing safety hints and an output schema existing, no additional behavioral or output details are needed.

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?

Schema description coverage is 0%, but the description includes an 'Args' section that documents the single parameter 'params' with its structure, including 'filepaths (List[str]): Paths to files (max 50)'. This adds meaning beyond the schema, but since there's only one parameter, the baseline is 4. However, the description could provide more semantic context (e.g., path format, note types).

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

Purpose5/5

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

The description clearly states the tool's purpose: 'Get metadata for multiple notes including tags, dates, and sizes.' It specifies the verb ('Get'), resource ('metadata for multiple notes'), and scope ('without reading full content'), distinguishing it from siblings like obsidian_get_file_contents (full content) and obsidian_get_frontmatter (specific metadata).

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool: 'Efficient way to get overview information about several Zettelkasten notes without reading full content. Useful for analyzing note collections.' It implicitly distinguishes it from content-reading tools but does not explicitly name alternatives or state when not to use it.

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/Shepherd-Creative/obsidian-mcp'

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