Skip to main content
Glama

Add note type field

add-note-type-field
Idempotent

Adds an empty field to every note of a chosen note type, with dry-run preview by default and no card-template changes.

Instructions

Adds an empty field to every note of one note type. Defaults to dry-run mode and does not add the field to card templates.

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": {
      "modelName": "<modelName>",
      "fieldName": "<fieldName>"
    },
    "name": "add-note-type-field"
  }
}

Input Schema

NameRequiredDescriptionDefault
orderNoOptional zero-based field order. Use 0 for the first field; omit to append.
dryRunNoWhen true, validate and preview the field without modifying Anki
fieldNameYesNew field name. Anki special field names such as Tags, Type, Deck, Card, and FrontSide are not allowed.
modelNameYesAnki note type name. AnkiConnect calls note types "models" in its API.
expectedSchemaHashNoHash returned by get-note-type-schema; required when dryRun is false and blocks stale writes

Output Schema

NameRequiredDescriptionDefault
dryRunYes
fieldsYes
appliedYes
changedYes
modelNameYes
addedFieldYes
validationYes
scopeWarningYes
previousFieldsYes
afterSchemaHashYesSHA-256 hash of the ordered note-type field names
beforeSchemaHashYesSHA-256 hash of the ordered note-type field names

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare non-read-only, idempotent, non-destructive, so the description's real contribution is the scope ('every note of one note type'), the dry-run default, and the exemption for card templates — all behavior beyond the structured fields. It does not say whether the operation can be undone or what a dry-run response contains, but the output schema likely covers the latter.

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?

Two short sentences with the core action and the most surprising defaults front-loaded; nothing is wasted. It is a touch terse given a five-parameter mutation tool, but every sentence earns its place.

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

Completeness4/5

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

With an output schema present and full parameter documentation, the description only needs to convey scope and defaults, which it does. The main omission is the operational path for a non-dry-run invocation (obtaining expectedSchemaHash via get-note-type-schema), which an agent must infer.

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 description coverage is 100%, so fieldName, modelName, order, dryRun, and expectedSchemaHash are already documented in the schema, including the special-name restriction and the stale-write guard. The description only echoes the dryRun default and adds no new parameter meaning, so 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 ('Adds an empty field to every note of one note type') with the blast radius spelled out. It implicitly separates itself from template tools by noting it does not touch card templates, though it never names a sibling tool.

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?

Mentioning that it defaults to dry-run implies a preview-then-apply workflow, but there is no explicit when-to-use guidance versus rename-note-type-field, reposition-note-type-field, or add-note-type-template, and no stated prerequisite such as fetching a schema hash before a real write.

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