Skip to main content
Glama
j-shelfwood

Obsidian Local REST API MCP Server

by j-shelfwood

get_metadata_values

Extract all unique values for a specified frontmatter key in your Obsidian vault, enabling efficient metadata management and data analysis.

Instructions

Get all unique values for a specific frontmatter key

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesFrontmatter key

Implementation Reference

  • The handler function in the ObsidianApiClient class that executes the tool logic by making an HTTP request to the Obsidian REST API endpoint for metadata values.
    async getMetadataValues(key: string) { return this.request(`/metadata/values/${encodeURIComponent(key)}`); }
  • Input schema definition for the get_metadata_values tool, defining the required 'key' string parameter.
    inputSchema: { type: "object", properties: { key: { type: "string", description: "Frontmatter key" }, }, required: ["key"], },
  • src/index.ts:428-438 (registration)
    Tool registration in the ListTools response, including name, description, and schema.
    { name: "get_metadata_values", description: "Get all unique values for a specific frontmatter key", inputSchema: { type: "object", properties: { key: { type: "string", description: "Frontmatter key" }, }, required: ["key"], }, },
  • src/index.ts:526-527 (registration)
    Dispatch/registration in the CallToolRequestHandler switch statement, mapping the tool name to the client handler.
    case "get_metadata_values": result = await this.client.getMetadataValues(args?.key as string);

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/j-shelfwood/obsidian-local-rest-api-mcp'

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