Skip to main content
Glama

add_field_to_model

Destructive

Add a field to a model, class, or interface across Prisma, Python, and TypeScript files without raw text edits.

Instructions

Add a field to a model/class/interface. Supports .prisma, .py (dataclass, SQLAlchemy), .ts/.tsx.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterNoInsert after the line containing this string.
modelYesModel/class/interface name.
projectNoProject name/path (default: active).
file_pathNoOptional file path to disambiguate.
field_nameYesName of the new field.
field_typeYesType of the field (e.g. 'String', 'DateTime?', 'number').

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.0.0

TDQS

B3.3/5.0
Behavior2/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and idempotentHint=false, so the safety profile is covered. The description adds nothing behavioral beyond that: it does not say the file is modified in place, where the field lands by default, whether the write is transactional, or what happens if the model is not found. Only format coverage is offered.

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

Conciseness5/5

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

Two sentences, front-loaded with the action and then the applicable formats. Zero filler; nothing could be removed without losing information.

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 6-parameter, 3-required destructive mutation tool with no output schema, the description is minimal. The schema covers parameters well, but an agent gets no guidance on default placement, error behavior when the model/file cannot be resolved, or interaction with the sibling editing tools.

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% and every parameter has its own description, so the schema does the heavy lifting. The description only restates the supported languages and a couple of field_type examples that already appear in the schema, adding no new semantic detail (e.g. how the default insertion point is chosen when 'after' is omitted).

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 concrete verb+resource ('Add a field to a model/class/interface') and enumerates the supported file types and frameworks (.prisma, .py dataclass/SQLAlchemy, .ts/.tsx). It is clear on its own, but it does not distinguish itself from sibling editing tools such as insert_near_symbol or edit_lines_in_symbol, which likely also mutate source structure.

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?

The supported-format list implies when the tool applies, but there is no explicit when-to-use guidance versus the many sibling mutation tools (insert_near_symbol, replace_symbol_source, edit_lines_in_symbol). No prerequisites, no exclusions, no alternative named.

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