Skip to main content
Glama

Get unique values

get_unique_values
Read-only

Lists all distinct values for a chosen metadata field across an Obsidian vault, so you can see which frontmatter values exist before filtering or querying notes.

Instructions

Get all unique values for a metadata field

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "field": "<field>"
    },
    "name": "get_unique_values"
  }
}

Input Schema

NameRequiredDescriptionDefault
fieldYesMetadata field name
vaultNoVault name. May be omitted when only one vault is configured; see list_vaults.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv2.0.1
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / properties / field / minLength
      Added value: +1
    • changedInput schema / properties / vault / description
      Previous value: -"Vault name"New value: +"Vault name. May be omitted when only one vault is configured; see list_vaults."
    • changedInput schema / required
      Previous value: -[
      -  "vault",
      -  "field"
      -]New value: +[
      +  "field"
      +]
  2. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare this is a read-only, non-open-world operation, so the safety profile is covered. The description adds the 'unique' deduplication guarantee and the implied full-set scope, but says nothing about cost, vault-wide scanning, sort order, or empty results.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no wasted words. Its brevity is efficient rather than padded, though it borders on under-specified for a tool whose semantics depend on field-name conventions.

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?

For a simple two-parameter read with full schema coverage and read-only annotations, little more is strictly required. Still missing is any hint about what comes back (ordered list of values, handling of missing fields), which matters since no output schema exists.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so both the required 'field' and optional 'vault' parameters are already documented in the schema, including the list_vaults pointer. The description adds nothing about expected field syntax (frontmatter key vs. dotted path) beyond what the schema states, so the baseline 3 applies.

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?

States a specific verb and resource: 'Get all unique values for a metadata field'. An agent can infer this enumerates distinct frontmatter field values, though the description never distinguishes it from lookalikes such as list_tags or get_note_metadata.

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

Usage Guidelines3/5

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

Usage is only implied by the wording: reach for it when you need the distinct values a metadata field takes. There is no explicit when-to-use, no mention of prerequisites, and no pointer to alternatives for tag enumeration or per-note metadata retrieval.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.