Skip to main content
Glama

Add a field to a table of the file

patchwork_add_field

Adds a plain or calculated field to a FileMaker table in a versioned, reversible change. Refuses duplicates and skips layout placement, so use patchwork_place_field to position it.

Instructions

Add a field to a table. With calc the field is a calculation, otherwise a plain field of the given type. Refused when the field already exists. The result is re-exported, and the version is dropped with an error if the field is missing from it. The field is not put on any layout: use patchwork_place_field for that. Makes a new version; patchwork_undo reverses it.

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": {
      "table": "<table>",
      "name": "<name>"
    },
    "name": "patchwork_add_field"
  }
}

Input Schema

NameRequiredDescriptionDefault
calcNoFileMaker formula. When given, the field is a calculation with this formula.
nameYesName of the new field, without the table.
typeNoData type, or result type of the calculation. Default: Text.
tableYesBase table that gets the field. Names come from patchwork_list kind=tables.
commentNoComment shown beside the field in Manage Database.
contextNoTable occurrence the calculation is evaluated from. Only with calc.
dry_runNoOnly write the patch file to .patchwork/ and return its path. Nothing is applied, no version is made.
messageNoWhat this change does, kept in the version log. Default: a short description of the change.
is_globalNoUse global storage: one value for the whole file instead of one per record.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only say this is a non-read-only, non-idempotent, non-destructive write; the description adds the meaningful behavior beyond that: duplicate-name refusal (explaining the non-idempotency), creation of a new version, and an error/drop path when the re-export lacks the field. It also discloses that the change is reversible via patchwork_undo, which an agent needs in order to reason about risk.

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?

Purpose and the calc/type distinction are front-loaded in the first two sentences, followed by failure modes and the sibling hand-off. Every sentence carries information, though "The result is re-exported, and the version is dropped with an error if the field is missing from it" is compressed to the point of being slightly opaque.

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?

For a 9-parameter mutation with no output schema, the description covers the creation semantics, duplicate refusal, version/undo lifecycle, and the layout caveat, which is close to what an agent needs to call it safely. Remaining gaps are environmental (whether a live file/connection is required, auth/permission expectations) rather than about the operation itself.

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 the baseline is 3 and the schema already explains calc, type, context, dry_run, message, is_global and comment. The description reinforces the calc/type relationship (a calc makes type the result type), which is mild added meaning, but it says nothing about dry_run, is_global, or message semantics.

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?

Opens with a specific verb+resource ("Add a field to a table") and immediately distinguishes the calc path from the plain-typed-field path. It also explicitly separates itself from patchwork_place_field, so an agent can tell what this tool does and does not do without opening a schema.

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

Usage Guidelines4/5

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

Names the alternative for the adjacent task ("The field is not put on any layout: use patchwork_place_field for that") and names patchwork_undo as the reversal path. It also gives a precondition (refused if the field exists). It stops short of a full when-not statement (e.g. permissions or connection prerequisites), but the routing guidance is clear.

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