Skip to main content
Glama
MarkusPfundstein

MCP server for Obsidian

obsidian_get_periodic_note

Retrieve current periodic notes (daily, weekly, monthly, quarterly, yearly) from Obsidian vaults, returning either content or metadata as needed.

Instructions

Get current periodic note for the specified period.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
periodYesThe period type (daily, weekly, monthly, quarterly, yearly)
typeNoThe type of data to get ('content' or 'metadata'). 'content' returns just the content in Markdown format. 'metadata' includes note metadata (including paths, tags, etc.) and the content.content

Implementation Reference

  • The run_tool method of PeriodicNotesToolHandler that validates arguments and calls the Obsidian API to get the periodic note content.
    def run_tool(self, args: dict) -> Sequence[TextContent | ImageContent | EmbeddedResource]:
        if "period" not in args:
            raise RuntimeError("period argument missing in arguments")
    
        period = args["period"]
        valid_periods = ["daily", "weekly", "monthly", "quarterly", "yearly"]
        if period not in valid_periods:
            raise RuntimeError(f"Invalid period: {period}. Must be one of: {', '.join(valid_periods)}")
        
        type = args["type"] if "type" in args else "content"
        valid_types = ["content", "metadata"]
        if type not in valid_types:
            raise RuntimeError(f"Invalid type: {type}. Must be one of: {', '.join(valid_types)}")
    
        api = obsidian.Obsidian(api_key=api_key, host=obsidian_host)
        content = api.get_periodic_note(period,type)
    
        return [
            TextContent(
                type="text",
                text=content
            )
        ]
  • Defines the Tool schema including inputSchema for the obsidian_get_periodic_note tool.
    def get_tool_description(self):
        return Tool(
            name=self.name,
            description="Get current periodic note for the specified period.",
            inputSchema={
                "type": "object",
                "properties": {
                    "period": {
                        "type": "string",
                        "description": "The period type (daily, weekly, monthly, quarterly, yearly)",
                        "enum": ["daily", "weekly", "monthly", "quarterly", "yearly"]
                    },
                    "type": {
                        "type": "string",
                        "description": "The type of data to get ('content' or 'metadata'). 'content' returns just the content in Markdown format. 'metadata' includes note metadata (including paths, tags, etc.) and the content.",
                        "default": "content",
                        "enum": ["content", "metadata"]
                    }
                },
                "required": ["period"]
            }
        )
  • Registers the PeriodicNotesToolHandler instance among other tools in the MCP server.
    add_tool_handler(tools.ListFilesInDirToolHandler())
    add_tool_handler(tools.ListFilesInVaultToolHandler())
    add_tool_handler(tools.GetFileContentsToolHandler())
    add_tool_handler(tools.SearchToolHandler())
    add_tool_handler(tools.PatchContentToolHandler())
    add_tool_handler(tools.AppendContentToolHandler())
    add_tool_handler(tools.PutContentToolHandler())
    add_tool_handler(tools.DeleteFileToolHandler())
    add_tool_handler(tools.ComplexSearchToolHandler())
    add_tool_handler(tools.BatchGetFileContentsToolHandler())
    add_tool_handler(tools.PeriodicNotesToolHandler())
    add_tool_handler(tools.RecentPeriodicNotesToolHandler())
    add_tool_handler(tools.RecentChangesToolHandler())
  • The Obsidian API client method that makes the HTTP request to retrieve the periodic note from the Obsidian server.
    def get_periodic_note(self, period: str, type: str = "content") -> Any:
        """Get current periodic note for the specified period.
        
        Args:
            period: The period type (daily, weekly, monthly, quarterly, yearly)
            type: Type of the data to get ('content' or 'metadata'). 
                'content' returns just the content in Markdown format. 
                'metadata' includes note metadata (including paths, tags, etc.) and the content.. 
            
        Returns:
            Content of the periodic note
        """
        url = f"{self.get_base_url()}/periodic/{period}/"
        
        def call_fn():
            headers = self._get_headers()
            if type == "metadata":
                headers['Accept'] = 'application/vnd.olrapi.note+json'
            response = requests.get(url, headers=headers, verify=self.verify_ssl, timeout=self.timeout)
            response.raise_for_status()
            
            return response.text
    
        return self._safe_call(call_fn)
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 states the tool 'gets' data, implying a read-only operation, but doesn't disclose behavioral traits such as error handling (e.g., if no note exists for the period), performance considerations, or output format details. The description is minimal and lacks context beyond the basic action, leaving gaps in understanding how the tool behaves in practice.

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, clear sentence that front-loads the core action ('Get current periodic note') and specifies the key input ('for the specified period'). There is no wasted text, repetition, or unnecessary elaboration, making it highly efficient and easy to parse.

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 no annotations and no output schema, the description is incomplete. It doesn't explain what 'current' means (e.g., today's daily note, this week's weekly note), how the tool handles missing notes, or the structure of returned data (content vs. metadata). For a tool with 2 parameters and behavioral uncertainty, more context is needed to fully guide an agent.

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 100%, with both parameters well-documented in the schema (period types and data types). The description adds no additional parameter semantics beyond what the schema provides, such as explaining what 'current' means relative to the period or default behaviors. With high schema coverage, the baseline is 3, as the description doesn't compensate but doesn't need to heavily.

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 verb ('Get') and resource ('current periodic note'), specifying it retrieves notes for a given period. It distinguishes from siblings like obsidian_get_file_contents (general files) and obsidian_get_recent_periodic_notes (recent notes), but doesn't explicitly contrast them. The purpose is specific and actionable, though sibling differentiation is implicit rather than explicit.

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 for retrieving periodic notes, with context from the input schema (period types and data types). However, it lacks explicit guidance on when to use this versus alternatives like obsidian_get_file_contents (for non-periodic files) or obsidian_get_recent_periodic_notes (for recent notes). Usage is clear from the tool name and parameters but not explicitly stated in the description text.

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

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