Skip to main content
Glama

get_metadata_schema

List declared metadata fields with names, types, and descriptions to build metadata filters, sorts, aggregations, or groupings for document searches. Call when questions filter by typed attributes like year or status.

Instructions

List declared metadata fields (names, types, descriptions) so you can build metadata_filter / sort / aggregates / group_by for search_documents(mode="metadata"), or a metadata_filter that narrows mode="query". Call it only when the question filters by a typed attribute (year, status, category, …) or asks for counts / averages / extremes / distributions — not as a routine first step; ordinary discovery goes through browse_documents(). Call it WITHOUT folder_id first: one call returns the account-level fields plus every folder that declares its own, with folder ids — no need for get_folder_structure() beforehand. Pass a folder_id only to read one folder's effective schema (it falls back to the account-level one). Reuse the result for the rest of the conversation.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_metadata_schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
folder_idNoOptional folder ID. Omit it for an overview: the account-level fields plus every folder that declares its own (on a folder-scoped connection, omission returns the scoped folder's schema instead). Pass "root" for the account-level schema only. Pass a folder ID for the fields that apply to its documents: fields are declared on a top-level folder and shared by every folder in it, and a top-level folder that declares none uses the account-level fields.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.9.0

TDQS

A4.6/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full disclosure burden, and it does substantial work: it explains that one call returns account-level fields plus every folder that declares its own (with folder ids), that a `folder_id` read returns that folder's effective schema with fallback to account-level, and that the result should be cached rather than re-fetched. It stops short of stating read-only/safety semantics or response size limits explicitly, though 'List' implies a non-mutating read.

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?

Front-loaded with the purpose, then alternation between use and non-use, then call mechanics — a sensible information hierarchy. It is dense and long for a one-parameter tool, with heavy backticked inline references, but each sentence contributes a distinct decision rule rather than repeating itself.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, and the description compensates by describing what comes back (field names, types, descriptions, folder ids) and the scope of that payload. For a single optional-parameter, read-only discovery tool, nothing an agent needs to call it correctly or interpret the result is missing.

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

Parameters4/5

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

Schema coverage is 100% and the schema already details `folder_id` including the 'root' sentinel and inheritance rules, so the baseline is a 3. The description adds workflow meaning the schema does not: the recommended sequence of calling without `folder_id` first to avoid a prior `get_folder_structure()` call, which is a genuine operational constraint beyond the field definition.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a concrete verb and resource — 'List declared metadata fields (names, types, descriptions)' — and names the exact downstream consumers (`metadata_filter`, `sort`, `aggregates`, `group_by`) it feeds. It also names siblings it is not (browse_documents, get_folder_structure), so an agent can route without opening schemas.

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

Usage Guidelines5/5

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

Gives explicit when-to-use triggers ('filters by a typed attribute (year, status, category)' or asks for counts/averages/extremes/distributions), an explicit when-not ('not as a routine first step; ordinary discovery goes through browse_documents()'), and a named alternative. It further prescribes call order — omit `folder_id` first, reuse the result for the rest of the conversation.

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