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
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Frontmatter key |
Implementation Reference
- src/index.ts:246-248 (handler)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)}`); }
- src/index.ts:431-437 (schema)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);