Skip to main content
Glama

gograph_interfaces

Read-onlyIdempotent

Find all Go interfaces that a given struct implicitly implements using duck-typing resolution. Use to understand which contracts a struct fulfills before refactoring.

Instructions

Find all Go interfaces satisfied by a named concrete struct (duck-typing resolution — inverse of gograph_implementers). Given a struct name, returns every interface whose complete method set is a subset of that struct's methods. Requires .gograph/graph.json — run gograph build . first. Read-only; no side effects. WHEN TO USE: When you need to know which contracts a struct implicitly fulfills — useful before refactoring a method to understand which interface contracts will break. NOT TO USE: For finding structs that implement an interface (use gograph_implementers); for listing interface declarations in a package (use gograph_node or gograph_public). RETURNS: Interface names, method signatures, and file locations; empty when the struct satisfies no known interfaces.

Input Schema

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

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

Annotations already mark readOnlyHint=true, destructiveHint=false, idempotentHint=true. The description confirms 'Read-only; no side effects' and adds details about return values (interface names, method signatures, file locations; empty when no interfaces). No contradiction.

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?

The description is a single paragraph that front-loads the main purpose and includes usage guidelines and return info. It is well-structured and informative, though slightly verbose for a tool with only one parameter. Still very effective.

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 one required parameter, no output schema, and annotations covering safety, the description explains what is returned, when empty, and the prerequisite. It provides all necessary context for an agent to use the tool 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?

Schema coverage is 100% (one parameter 'struct' with description 'The name of the struct (e.g., 'AuthService')'). The description says 'Given a struct name' but does not add syntax, constraints, or examples beyond the schema. Baseline 3 is appropriate.

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 clearly states purpose: 'Find all Go interfaces satisfied by a named concrete struct (duck-typing resolution — inverse of gograph_implementers)'. It uses a specific verb (Find) and resource (interfaces), and distinguishes from a sibling tool by labeling it as inverse.

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?

Explicitly states when to use ('useful before refactoring a method to understand which interface contracts will break') and when not to use ('for finding structs that implement an interface (use gograph_implementers); for listing interface declarations (use gograph_node or gograph_public)'). Also specifies prerequisite: requires .gograph/graph.json and running 'gograph build .' first.

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