Skip to main content
Glama

gograph_interfaces

Read-onlyIdempotent

Find every Go interface a given struct implicitly satisfies, so you can see which contracts break before refactoring a method. Returns interface names, signatures, and file locations.

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. 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: 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

NameRequiredDescriptionDefault
rootNoAbsolute path of the checkout you are working in (your cwd or git worktree). Must be this server's repository or one of its git worktrees; the answer then comes from that checkout's own graph. A path elsewhere is refused. Alias: cwd. Omit only when the configured checkout is the one you mean.
limitNoMaximum rows per page; the byte budget may return fewer.
cursorNoOpaque next_cursor for the same graph snapshot and result selection.
structYesThe name of the struct (e.g., 'AuthService')
intentionNoTechnical rationale, required for analytical calls selecting an active session.
session_idNoCaller selector returned by session_create. Omission means an independent caller; never inherits server environment or another caller's session.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.7.18
    • addedInput schema / properties / intention
      Added value: +{
      +  "description": "Technical rationale, required for analytical calls selecting an active session.",
      +  "type": "string"
      +}
    • addedInput schema / properties / root
      Added value: +{
      +  "description": "Absolute path of the checkout you are working in (your cwd or git worktree). Must be this server's repository or one of its git worktrees; the answer then comes from that checkout's own graph. A path elsewhere is refused. Alias: cwd. Omit only when the configured checkout is the one you mean.",
      +  "type": "string"
      +}
    • addedInput schema / properties / session_id
      Added value: +{
      +  "description": "Caller selector returned by session_create. Omission means an independent caller; never inherits server environment or another caller's session.",
      +  "type": "string"
      +}
  2. 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"
      +}
  3. Addedv1.5.3
  4. Removedv1.5.3
  5. First observedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

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

The annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, but the description contributes real behavior beyond them: the server checks freshness before the call, refreshes in the requested analysis mode, and precise/precise_fallback graphs retry CHA/SSA after source changes. It also sets expectations for the empty-result case, which an agent needs in order to interpret a null answer correctly rather than assuming failure.

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?

Well front-loaded: the core definition and inverse relationship come first, then WHEN/NOT WHEN, then RETURNS, with labeled sections that are easy to scan. Minor waste remains — 'Read-only; no side effects' repeats what readOnlyHint and destructiveHint=false already say, and the CHA/SSA retry detail is more machinery than an agent needs to choose and call the tool.

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?

There is no output schema, so the description must describe return values, and it does: interface names, method signatures, file locations, and the empty-set case. Combined with full schema coverage for the six parameters and annotations covering the safety profile, an agent has everything needed to select and invoke it 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 description coverage is 100%, so root, limit, cursor, struct, intention, and session_id are all documented in the input schema itself. The description only restates that a struct name is the input, adding no new syntax, naming, or resolution rules beyond 'e.g. AuthService' already in the schema. Baseline 3 is appropriate when the schema carries the parameter burden.

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?

States a specific verb and resource ('find all Go interfaces satisfied by a named concrete struct') and immediately frames it as the inverse of gograph_implementers. The formal definition — every interface whose method set is a subset of the struct's methods — makes the semantics unambiguous and distinguishable from every sibling in a 60+ tool namespace.

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 section gives a concrete scenario (before refactoring a method, to see which contracts break) and an explicit NOT TO USE section routes the agent to gograph_implementers for the inverse query and to gograph_node/gograph_public for interface declarations. That is exactly the when/when-not/alternatives structure the top score requires.

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