Get note frontmatter properties
obsidian_get_propertiesRetrieve the YAML frontmatter properties of an Obsidian note as JSON, using its file name or path.
Instructions
Returns the YAML frontmatter properties of a note as JSON.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vault | No | Vault name to target. Optional — defaults to the most recently focused vault. | |
| file | No | Note name resolved as a wikilink (e.g. 'My Note'). Provide either `file` or `path`. | |
| path | No | Vault-root-relative path to the note (e.g. 'Folder/My Note.md'). Provide either `file` or `path`. |
Implementation Reference
- src/tools.ts:483-486 (handler)The handler for obsidian_get_properties. Validates that either file or path is provided, then calls runJson with the 'properties' command to fetch frontmatter properties from a note.
handler: async ({ vault, file, path }) => { requireFileTarget({ file, path }); return runJson("properties", { vault, params: { file, path } }); }, - src/tools.ts:477-482 (schema)The registration entry for obsidian_get_properties, including its name, title, description, input schema (vault + file/path), and read-only annotation.
{ name: "obsidian_get_properties", title: "Get note frontmatter properties", description: "Returns the YAML frontmatter properties of a note as JSON.", inputSchema: { ...VaultArg, ...FileTargetArg }, annotations: { readOnlyHint: true, openWorldHint: false }, - src/tools.ts:477-487 (registration)The tool is registered in the tools array at src/tools.ts line 477. The index.ts file iterates over this array and calls server.registerTool for each entry.
{ name: "obsidian_get_properties", title: "Get note frontmatter properties", description: "Returns the YAML frontmatter properties of a note as JSON.", inputSchema: { ...VaultArg, ...FileTargetArg }, annotations: { readOnlyHint: true, openWorldHint: false }, handler: async ({ vault, file, path }) => { requireFileTarget({ file, path }); return runJson("properties", { vault, params: { file, path } }); }, },