Skip to main content
Glama
pmmvr

Obsidian MCP Server

by pmmvr

get_note_content

Read-only

Retrieve the full content and metadata of a specific note by its path within an Obsidian vault, enabling efficient data access and analysis for AI-driven workflows.

Instructions

Get the full content and metadata of a specific note by path.

Args:
    path: Full path to the note within the vault

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Implementation Reference

  • The main handler function for the 'get_note_content' tool. It retrieves the note's metadata and content by calling the Obsidian client's get_note_metadata method, handling success and error cases.
    async def get_note_content(path: str) -> Dict[str, Any]:
        """
        Get the full content and metadata of a specific note by path.
        
        Args:
            path: Full path to the note within the vault
        """
        try:
            note_data = await client.get_note_metadata(path)
            return {
                "success": True,
                "data": note_data
            }
        except Exception as e:
            return {
                "success": False,
                "error": f"Failed to get note at path '{path}': {str(e)}",
                "data": None
            }
  • Registers the 'get_note_content' tool with the FastMCP server, providing metadata annotations like title and read-only hints.
    @mcp.tool(
        annotations={
            "title": "Get Obsidian Note Content",
            "readOnlyHint": True,
            "openWorldHint": False
        }
    )
  • Helper method in ObsidianClient that performs the HTTP GET request to fetch note metadata from the Obsidian API.
    async def get_note_metadata(self, path: str) -> Dict[str, Any]:
        encoded_path = quote(path, safe='/')
        return await self._request(
            "GET", 
            f"/vault/{encoded_path}",
            headers={"Accept": "application/vnd.olrapi.note+json"}
        )
Behavior3/5

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

Annotations provide readOnlyHint=true and openWorldHint=false, indicating a safe, read-only operation with a closed world. The description adds context by specifying 'full content and metadata,' which hints at the return format, but doesn't detail aspects like error handling, rate limits, or auth needs. No contradiction with annotations exists.

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 front-loaded with the core purpose in the first sentence, followed by a concise parameter explanation. Every sentence earns its place with no wasted words, 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.

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 (1 parameter, no output schema), annotations cover safety, and the description adds parameter semantics and purpose. However, it lacks details on return values, error cases, or how it differs from siblings, leaving some gaps for an AI agent to infer usage.

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?

With 0% schema description coverage and 1 parameter, the description compensates by explaining 'path: Full path to the note within the vault,' adding meaning beyond the bare schema. It clarifies the parameter's purpose and format, though it could provide more examples or constraints.

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 tool's purpose: 'Get the full content and metadata of a specific note by path.' It specifies the verb ('Get'), resource ('note'), and scope ('full content and metadata'), though it doesn't explicitly differentiate from sibling tools like 'browse_vault_structure' or 'search_vault' beyond the 'specific note by path' aspect.

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

Usage Guidelines3/5

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

The description implies usage by specifying 'by path,' suggesting it's for retrieving a known note, but it doesn't provide explicit guidance on when to use this tool versus alternatives like 'search_vault' for unknown notes or 'browse_vault_structure' for exploring. No exclusions or prerequisites are mentioned.

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

Related 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/pmmvr/obsidian-api-mcp-server'

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