Analyze Note Tags
tags.analyzeAnalyze a single note to extract and categorize its tags into frontmatter, inline, and deduplicated union lists.
Instructions
Return the tags present in a single note, split into frontmatterTags, inlineTags, and their de-duplicated union allTags. Use this when you have one note and want to know what tags it carries — contrast with tags.search, which scans the whole vault for one specific tag. Read-only.
Operates on the session-active vault (see vault.current — selectable via vault.select) unless an explicit vaultPath argument is passed, which always wins.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Vault-relative note path to analyze. | |
| vaultPath | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| frontmatterTags | Yes | ||
| inlineTags | Yes | ||
| allTags | Yes | Union of frontmatter and inline tags, de-duplicated. |
Implementation Reference
- src/schema/tags.ts:39-46 (schema)Input schema (tagsAnalyzeArgsSchema) defining the 'path' and optional 'vaultPath' arguments accepted by tags.analyze.
export const tagsAnalyzeArgsSchema = z .object({ path: notePathSchema.describe("Vault-relative note path to analyze."), vaultPath: z.string().optional(), }) .strict() .describe("Arguments for `tags.analyze`."); export type TagsAnalyzeArgs = z.input<typeof tagsAnalyzeArgsSchema>; - src/schema/tags.ts:98-105 (schema)Output schema (tagsAnalyzeOutputSchema) defining the shape returned by tags.analyze: path, frontmatterTags, inlineTags, and allTags.
export const tagsAnalyzeOutputSchema = z .object({ path: z.string(), frontmatterTags: z.array(z.string()), inlineTags: z.array(z.string()), allTags: z.array(z.string()).describe("Union of frontmatter and inline tags, de-duplicated."), }) .passthrough();