Skip to main content
Glama

gograph_fields

Read-onlyIdempotent

Extract declared fields from a Go struct, including field names, Go types, and raw struct tag strings. Use this to inspect JSON/DB serialization mappings or enumerate fields before modification.

Instructions

Extract all declared fields from a named Go struct: field names, Go types, and raw struct tag strings (json, db, yaml, gorm, etc.). Requires .gograph/graph.json — run gograph build . first. Read-only; no side effects. WHEN TO USE: When mapping JSON/DB serialization tags, inspecting struct layouts, or enumerating fields before adding a new one. NOT TO USE: For methods on the struct (use gograph_node or gograph_source); for all struct initialization sites (use gograph_literals). RETURNS: Array of field entries with name, type, and tag string; empty when the struct is not found.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
structYesThe exact name of the target struct to inspect fields for (e.g., 'Config', 'User')
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false. The description adds contextual traits: requires '.gograph/graph.json' pre-condition, states 'Read-only; no side effects', and describes return behavior (array of field entries; empty if struct not found). This goes beyond annotations without contradiction.

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 short (3 sentences) and well-structured with clear sections (WHEN TO USE, NOT TO USE, RETURNS). Every sentence serves a purpose—no redundancy or filler.

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?

For a simple tool with 1 required parameter and no output schema, the description covers prerequisites, side effects, return format, and error case. No missing context; fully adequate for correct usage.

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% with a single 'struct' parameter whose description is adequate. The tool description does not add additional semantic details beyond the schema baseline. The baseline 3 applies since the schema already handles it.

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 starts with a clear verb+resource: 'Extract all declared fields from a named Go struct' and specifies outputs (field names, Go types, raw struct tag strings). It distinguishes from siblings by explicitly naming alternatives for methods (gograph_node, gograph_source) and initialization sites (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?

Includes explicit 'WHEN TO USE' and 'NOT TO USE' sections, referencing specific sibling tools as alternatives. This provides clear guidance for tool selection, e.g., 'For methods on the struct (use gograph_node or gograph_source); for all struct initialization sites (use gograph_literals).'

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