Skip to main content
Glama

teach_pattern

Register a manual generalization pattern that maps an entity kind to query and resource templates, enabling consistent entity substitution for lookups.

Instructions

Install a manual generalization pattern (query_template, resource_template, entity_kind)

Input Schema

NameRequiredDescriptionDefault
csvNoOutput as CSV (table and array responses) (default: false)
yesNoSkip confirmation prompts (explicit confirmation for scripts) (default: false)
jsonNoOutput as JSON (default: false)
agentNoSet agent-friendly output defaults (--json --compact --no-input --no-color) (default: false)
plainNoOutput as plain tab-separated text (default: false)
quietNoBare output, one value per line (default: false)
venueNoOptional venue scope tag
selectNoComma-separated fields to include in output (e.g. --select id,notetype_id,deck_id)
compactNoReturn only key fields (id, name, status, timestamps) for minimal token usage (default: false)
dry-runNoShow request without sending (default: false)
max-ageNoMaximum acceptable age of local-store data before a stderr hint suggests sync; 0 disables (default: 30m0s)
receiptNoWrite an atomic private run receipt (default: false)
timeoutNoRequest timeout (default: 1m0s)
no-cacheNoBypass response cache (default: false)
no-colorNoDisable colored output (default: false)
no-inputNoDisable all interactive prompts (for CI/agents) (default: false)
no-learnNoDisable the teach/recall learning loop for this invocation (default: false)
strategyNoSubstitution strategy: substitute | substitute-then-search-prefix (default substitute)
idempotentNoTreat already-existing create results as a successful no-op (default: false)
rate-limitNoMax requests per second (0 to disable; default auto — pace to server rate-limit headers) (default: auto)
data-sourceNoData source for read commands: auto (live with local fallback), live (API only), local (synced data only) (default: auto)
entity-kindNoEntity kind name registered in entity_lookups (required)
resource-typeNoResource type for substituted IDs (required)
client-profileNoSelect the tenant-gated client profile (env: ANKIWEB_CLIENT_PROFILE)
human-friendlyNoEnable colored output and rich formatting (default: false)
query-templateNoQuery template with {entity} placeholder (required)
resource-templateNoResource template with typed entity slot, e.g. PREFIX-{entity:country} (required)
allow-partial-failureNoDowngrade response-body partial-failure (e.g. partialFailureError) to a warning instead of a non-zero exit (default: false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.6/5.0
Behavior2/5

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

Annotations declare readOnlyHint=false but not destructive, and the description adds nothing beyond that — no word on what state is created, whether re-teaching overwrites an existing pattern, whether confirmation is prompted, or how failures surface. For a write tool with 28 parameters of shared CLI plumbing, that is a real gap.

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 filler; the only weakness is that brevity here is achieved by omission rather than by tight editing of necessary content.

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

Completeness2/5

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

A 28-parameter write tool with no output schema and thin annotations needs far more than one clause: what a pattern consists of, what happens on conflict, and how it interacts with the recall/learn loop are all missing.

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 the baseline is 3; the description does point at the three semantically important parameters (query-template, resource-template, entity-kind), which helps an agent ignore the ~24 generic output/transport flags. It does not explain the {entity} placeholder syntax or the {entity:country} typed slot beyond what the schema already says.

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

Purpose3/5

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

The verb 'Install' plus the parenthetical naming of the three core inputs (query_template, resource_template, entity_kind) gives a rough idea of what is written. However, 'manual generalization pattern' is internal jargon that an agent cannot map cleanly onto the sibling tools teach, teach_lookup, and teach_playbook, so the purpose is only partially disambiguated.

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

Usage Guidelines2/5

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

There is no statement of when to use this instead of teach, teach_lookup, teach_playbook, or learnings_confirm, nor any prerequisite such as registering the entity kind first. The agent must infer the correct tool from the name alone.

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