Skip to main content
Glama

gograph_mutate

Read-onlyIdempotent

Find struct-field and package-global mutation sites in Go code, excluding local assignments. Audit mutability or diagnose state changes with read-only precision.

Instructions

Find struct-field and package-global mutation sites. Use Type.Field to exclude same-named fields on unrelated types; ordinary local-variable assignments are excluded. The MCP server refreshes in the current requested analysis mode; a precise graph adds ++/+=, pointer-alias, atomic/sync/wrapper, and channel mutations and re-runs that analysis after source edits. Read-only; no side effects. WHEN TO USE: Diagnosing state changes or auditing mutability. NOT TO USE: For field declarations (gograph_fields) or whole-struct initialization (gograph_literals). RETURNS: Mutation locations and indirect mutator method names when applicable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldYesThe field name to search for mutations (e.g., 'Status')
limitNoMaximum rows per page; the byte budget may return fewer.
cursorNoOpaque next_cursor for the same graph snapshot and result selection.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.7.5
    • addedInput schema / properties / cursor
      Added value: +{
      +  "description": "Opaque next_cursor for the same graph snapshot and result selection.",
      +  "maxLength": 128,
      +  "type": "string"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 100,
      +  "description": "Maximum rows per page; the byte budget may return fewer.",
      +  "maximum": 200,
      +  "minimum": 1,
      +  "type": "integer"
      +}
  2. Addedv1.5.3
  3. Removedv1.5.3
  4. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description redundantly restates 'Read-only; no side effects'. It does, however, add real behavioral context: the server re-refreshes in the requested analysis mode, a precise graph widens detection (++/+=, pointer-alias, atomic/sync/wrapper, channel), and analysis re-runs after source edits.

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 purpose followed by labeled WHEN/NOT/RETURNS sections make it scannable. Slightly dense in the middle sentence about analysis modes, but every sentence carries information and nothing is padding.

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?

Covers selection constraints, freshness/re-analysis behavior, and return contents (mutation locations plus indirect mutator method names), which compensates for the absent output schema. Pagination is documented in the schema via limit/cursor.

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%, so the baseline is 3. The description goes further by explaining the 'Type.Field' qualified form for the required field parameter, which disambiguates same-named fields across unrelated types, and by stating the exclusion of local-variable assignments.

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: 'Find struct-field and package-global mutation sites', which is a distinct capability from siblings like gograph_fields or gograph_usages. The scope qualifiers (excludes ordinary local-variable assignments) further sharpen what is returned.

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?

Explicit WHEN TO USE ('Diagnosing state changes or auditing mutability') and NOT TO USE clauses that name the correct alternatives: gograph_fields for declarations, gograph_literals for whole-struct initialization. Nothing is left to inference.

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