Skip to main content
Glama

gograph_mutate

Read-onlyIdempotent

Identify all locations where a specific struct field is assigned, enabling auditing of field mutability and diagnosis of unexpected state changes in Go codebases.

Instructions

Find all assignment sites where a named struct field is written to anywhere in the codebase. Requires .gograph/graph.json — run gograph build . first. Read-only; no side effects. WHEN TO USE: When diagnosing unexpected state changes, auditing field mutability, or finding all places that set a specific field before adding a validation rule. NOT TO USE: For reading field declarations (use gograph_fields); for whole-struct initialization sites (use gograph_literals). RETURNS: File paths and line numbers where the named field is assigned; empty when the field is never written to outside its struct initializers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldYesThe field name to search for mutations (e.g., 'Status')
Behavior5/5

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

Description states 'Requires .gograph/graph.json — run `gograph build .` first. Read-only; no side effects.' This adds context beyond annotations (readOnlyHint, destructiveHint, idempotentHint) by specifying a prerequisite and confirming no side effects. No contradictions.

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?

Front-loaded with core purpose, followed by prerequisite, read-only note, usage guidelines, and return info. Every sentence adds value; no wasted words.

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?

Given no output schema, the description explains return format (file paths and line numbers) and edge cases (empty when field never written outside initializers). Covers prerequisite, read-only, usage, and limitations. Complete for a mutation analysis tool.

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?

Only one parameter 'field' with schema description 'The field name to search for mutations (e.g., 'Status')'. The description restates this meaning but adds no new semantics beyond the schema. Baseline 3 due to high schema coverage.

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?

Clearly states the tool finds assignment sites for a named struct field. It specifies the verb 'find', the resource 'assignment sites', and the scope 'named struct field'. It explicitly distinguishes from sibling tools gograph_fields and gograph_literals.

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?

Provides explicit when-to-use scenarios (diagnosing unexpected state changes, auditing field mutability, before adding validation) and when-not-to-use (reading field declarations, whole-struct initialization), with alternative tools named.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ozgurcd/gograph'

If you have feedback or need assistance with the MCP directory API, please join our Discord server