Skip to main content
Glama
ToKiDoO

Advanced Obsidian MCP Server

by ToKiDoO

obsidian_list_commands

Discover available commands to execute within Obsidian by listing all interface actions, enabling command execution through the MCP server's integration.

Instructions

List all available commands you can run in obsidian interface. For commands used on specific notes, make sure to open a note first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The run_tool method of ListCommandsToolHandler that executes the core logic: calls api.list_commands() and returns the JSON list of Obsidian commands.
    def run_tool(self, args: dict) -> Sequence[TextContent | ImageContent | EmbeddedResource]:
        commands = api.list_commands()
        return [
            TextContent(
                type="text",
                text=json.dumps(commands, indent=2)
            )
        ]
  • The get_tool_description method defining the tool schema: no input parameters required.
    def get_tool_description(self):
        return Tool(
            name=self.name,
            description="List all available commands you can run in obsidian interface. For commands used on specific notes, make sure to open a note first.",
            inputSchema={
                "type": "object",
                "properties": {},
            }
        )
  • TOOL_MAPPING dictionary that maps the tool name 'obsidian_list_commands' (via constant) to its handler class ListCommandsToolHandler, used during registration.
    TOOL_MAPPING = {
        tools.TOOL_LIST_FILES_IN_DIR: tools.ListFilesInDirToolHandler,
        tools.TOOL_SIMPLE_SEARCH: tools.SearchToolHandler,
        tools.TOOL_PATCH_CONTENT: tools.PatchContentToolHandler,
        tools.TOOL_PUT_CONTENT: tools.PutContentToolHandler,
        tools.TOOL_APPEND_CONTENT: tools.AppendContentToolHandler,
        tools.TOOL_DELETE_FILE: tools.DeleteFileToolHandler,
        tools.TOOL_COMPLEX_SEARCH: tools.ComplexSearchToolHandler,
        tools.TOOL_BATCH_GET_FILES: tools.BatchGetFilesToolHandler,
        tools.TOOL_PERIODIC_NOTES: tools.PeriodicNotesToolHandler,
        tools.TOOL_RECENT_PERIODIC_NOTES: tools.RecentPeriodicNotesToolHandler,
        tools.TOOL_RECENT_CHANGES: tools.RecentChangesToolHandler,
        tools.TOOL_UNDERSTAND_VAULT: tools.UnderstandVaultToolHandler,
        tools.TOOL_GET_ACTIVE_NOTE: tools.GetActiveNoteToolHandler,
        tools.TOOL_OPEN_FILES: tools.OpenFilesToolHandler,
        tools.TOOL_LIST_COMMANDS: tools.ListCommandsToolHandler,
        tools.TOOL_EXECUTE_COMMANDS: tools.ExecuteCommandsToolHandler,
    }
  • The Obsidian class method list_commands() that makes the HTTP request to Obsidian API to fetch the list of commands, called by the tool handler.
    def list_commands(self) -> Any:
        """List all available commands you can run in obsidian interface. For commands on open notes, make sure to open a note first.
            
        Returns:
            List of available commands in obsidian.
        """
        url = f"{self.get_base_url()}/commands/"
        
        def call_fn():
            response = requests.get(url, headers=self._get_headers(), verify=self.verify_ssl, timeout=self.timeout)
            response.raise_for_status()
            return response.json()
    
        return self._safe_call(call_fn)
  • The register_tools function that iterates over selected tools, instantiates the handler classes from TOOL_MAPPING, and adds them to tool_handlers dictionary for use in list_tools and call_tool.
    def register_tools():
        """Register the selected tools with the server."""
        tools_to_include = parse_include_tools()
        
        registered_count = 0
        for tool_name in tools_to_include:
            if tool_name in TOOL_MAPPING:
                handler_class = TOOL_MAPPING[tool_name]
                handler_instance = handler_class()
                add_tool_handler(handler_instance)
                registered_count += 1
                logger.debug(f"Registered tool: {tool_name}")
        
        logger.info(f"Successfully registered {registered_count} tools")
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 of behavioral disclosure. The description mentions that it 'lists' commands, which implies a read-only operation, but it doesn't specify whether this requires specific permissions, what the output format looks like, or if there are any rate limits or constraints. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 two sentences, each serving a distinct purpose: the first states the tool's function, and the second provides a usage tip. There is no wasted language, and the information is front-loaded with the core purpose. This is an excellent example of concise and well-structured description.

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 simplicity (0 parameters, no output schema, no annotations), the description is adequate but could be more complete. It explains what the tool does and offers a usage tip, but without annotations or output schema, it doesn't fully cover behavioral aspects like response format or constraints. This meets the minimum viable standard for such a tool.

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 input schema has 0 parameters with 100% coverage, so no parameter information is needed. The description appropriately adds no parameter details, focusing instead on usage context. This aligns with the baseline expectation for tools with no parameters, earning a high score for not cluttering the description with unnecessary information.

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: 'List all available commands you can run in obsidian interface.' This specifies the verb ('list') and resource ('available commands'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'obsidian_execute_commands' or 'obsidian_understand_vault', which prevents a perfect score.

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 provides some usage guidance with the second sentence: 'For commands used on specific notes, make sure to open a note first.' This implies a prerequisite context for certain commands, but it doesn't explicitly state when to use this tool versus alternatives like 'obsidian_execute_commands' or other siblings. The guidance is helpful but incomplete for distinguishing between tools.

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

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