Skip to main content
Glama
libra850
by libra850

list_templates

Retrieve available note templates from the TEMPLATE folder to create structured content in Obsidian vaults.

Instructions

TEMPLATEフォルダ内の利用可能なテンプレート一覧を取得します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/server.ts:81-87 (registration)
    Registration of the 'list_templates' MCP tool including its name, description, and empty input schema
      name: 'list_templates',
      description: 'TEMPLATEフォルダ内の利用可能なテンプレート一覧を取得します',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • MCP server dispatch handler for 'list_templates' tool: calls ObsidianHandler.listTemplates() and returns JSON stringified result
    case 'list_templates':
      const templates = await this.obsidianHandler.listTemplates();
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(templates, null, 2),
          },
        ],
      };
  • ObsidianHandler.listTemplates(): delegates to TemplateEngine.getAvailableTemplates() to list available templates
    async listTemplates() {
      return await this.templateEngine.getAvailableTemplates();
    }
  • TemplateEngine.getAvailableTemplates(): core logic to read template directory, find .md files, parse variables and descriptions, return TemplateInfo[]
    async getAvailableTemplates(): Promise<TemplateInfo[]> {
      try {
        const files = await fs.readdir(this.templatesDir);
        const templates: TemplateInfo[] = [];
    
        for (const file of files) {
          if (file.endsWith('.md')) {
            const templatePath = path.join(this.templatesDir, file);
            const content = await fs.readFile(templatePath, 'utf-8');
            const templateInfo = this.parseTemplate(file, templatePath, content);
            templates.push(templateInfo);
          }
        }
    
        return templates;
      } catch (error) {
        throw new Error(`テンプレートディレクトリの読み込みに失敗しました: ${error instanceof Error ? error.message : String(error)}`);
      }
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states it retrieves a list, implying a read-only operation, but doesn't specify whether this requires authentication, what format the list returns (e.g., names, metadata), if there are rate limits, or if it's paginated. 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 a single, efficient sentence in Japanese that directly states the tool's purpose with zero wasted words. It's appropriately sized for a simple list-retrieval tool and front-loads the core functionality.

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 minimally adequate. It states what the tool does, but lacks details on return format, authentication, or error handling. For a basic list tool, it meets the minimum viable threshold but could be more complete by addressing behavioral aspects.

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 tool has 0 parameters, and schema description coverage is 100% (though empty). The description doesn't need to compensate for any parameter documentation gaps. It appropriately doesn't mention parameters since none exist, earning a baseline score of 4 for this dimension.

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 ('取得します' - retrieves) and resource ('TEMPLATEフォルダ内の利用可能なテンプレート一覧' - list of available templates in TEMPLATE folder). It's specific about what it retrieves (templates from a specific folder), but doesn't explicitly distinguish it from sibling tools like 'create_note_from_template' or 'search_files' which might also involve templates.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when this tool is appropriate versus using 'search_files' for templates or 'create_note_from_template' which might involve template selection. There's no context about prerequisites or exclusions.

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

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