Skip to main content
Glama

obsidian_get_notes_info

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

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 } )

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