Skip to main content
Glama

gograph_literals

Read-onlyIdempotent

Find every composite-literal initialization site for a named Go struct, returning file paths and line numbers. Use before adding a required field to assess migration impact.

Instructions

Find every composite-literal initialization site for a named Go struct — all locations where Foo{...} syntax is used to construct the struct. The MCP server checks freshness before this call and refreshes in the current requested analysis mode; precise and precise_fallback graphs retry CHA/SSA after source changes. Read-only; no side effects. WHEN TO USE: Before adding a required field to a struct — every site returned will fail to compile if the new field has no default; run this first to scope the migration blast radius. NOT TO USE: For finding string or integer magic values (use gograph_envs or grep for those); for factory functions that return the struct (use gograph_constructors). RETURNS: All file paths and line numbers where the named struct is composite-initialized; empty when the struct has no direct initialization sites.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
structYesThe name of the struct (e.g., 'User')
Behavior5/5

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

Annotations already declare readOnlyHint and destructiveHint, but the description adds meaningful behavioral details beyond them: freshness checks, mode-specific refreshing, and CHA/SSA retry behavior. It also discloses return semantics (empty when no sites). No contradiction with annotations.

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?

The description is well-structured with clear sections (WHEN TO USE, NOT TO USE, RETURNS) and front-loaded purpose. Each sentence contributes value, and the formatting aids scanning. Though moderately long, the complexity of the tool justifies the length.

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 a single-parameter tool with no output schema, the description fully covers required information: what it returns (file paths and line numbers), empty-result behavior, and relevant execution context (freshness/refresh). Combined with the strong annotations and schema, the description is complete for an agent to invoke correctly.

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?

The input schema has 100% coverage, describing the single parameter as 'The name of the struct (e.g., 'User').' The description adds little beyond restating 'named Go struct' and the Foo{...} example, which does not materially enhance parameter understanding. Baseline 3 is appropriate when structured schema already fully documents the parameter.

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?

The description opens with a specific verb and resource: 'Find every composite-literal initialization site for a named Go struct,' and clarifies the exact syntax pattern (Foo{...}). It also explicitly distinguishes itself from sibling tools by stating what it is NOT for (magic values via gograph_envs, factory functions via gograph_constructors), eliminating ambiguity.

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?

The description provides explicit WHEN TO USE guidance ('Before adding a required field to a struct') and NOT TO USE guidance with named alternative tools. This gives the agent clear decision rules for selecting this tool versus relevant siblings.

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