Skip to main content
Glama

code_types

Read-onlyIdempotent

Show a type's inheritance tree, including implementers, subclasses, and base types, and mark which types declare a given member to find overrides before changes.

Instructions

Shows a type's whole inheritance tree in one call: every type that implements or derives from it (directly or through others) and every base type and interface it builds on, each with kind, file and line. With memberName it also marks which of those types declare that member, which finds the implementations and overrides of a method. WHEN TO USE: before changing an interface, base class or virtual member (every implementer and subclass is affected), or to answer 'who implements IFoo' or 'what does this class inherit'. For call sites use code_callers; when you do not know the exact type name use code_search first. HOW IT MATCHES: from the base lists in the syntax index, by simple name and exact letter case (no symbol resolution). Several types with the same name are merged and named in a note; a base type from a library is shown as not in the index; a name that is not in the index is an error. Very deep or wide trees stop at a limit and say so. Reads only.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "workspace": "<workspace>",
      "typeName": "<typeName>"
    },
    "name": "code_types"
  }
}

Input Schema

NameRequiredDescriptionDefault
guideNotrue: put the code guide first in the result. Use on your first code call, or when told it changed.
typeNameYesExact type name, letter case included, e.g. 'IAuditStore' or 'OrderService'. A namespace prefix or type arguments ('Repo<T>') are ignored.
directionNoOptional: 'both' (default), 'derived' (implementers and subclasses only) or 'bases' (what it builds on only)
workspaceYesWorkspace name as shown in Waymark (a single workspace; '*' is not accepted)
memberNameNoOptional: a member name such as 'UsageAsync'; each listed type that declares it is marked, and a note counts them.
includeTestsNoOptional: include derived types in test folders (default true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.2.2
    • changedInput schema / properties / memberName / description
      Previous value: -"Optional: a member name; marks the types that declare it, e.g. 'UsageAsync' to find its implementations"New value: +"Optional: a member name such as 'UsageAsync'; each listed type that declares it is marked, and a note counts them."
    • changedInput schema / properties / typeName / description
      Previous value: -"Type name, e.g. 'IAuditStore' or 'OrderService' (a namespace or type arguments are ignored)"New value: +"Exact type name, letter case included, e.g. 'IAuditStore' or 'OrderService'. A namespace prefix or type arguments ('Repo<T>') are ignored."
  2. First observedv0.2.0

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it discloses matching semantics (syntax-index base lists, simple name, exact case, no symbol resolution), merge behavior for duplicate names, how out-of-index library bases are reported, that unknown names are an error, and that deep/wide trees truncate with a notice. 'Reads only' is consistent with readOnlyHint=true.

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 the core action, then structured under WHEN TO USE and HOW IT MATCHES headers; every sentence carries information (including edge-case behavior) with no filler. Dense but scannable for a six-parameter 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?

Covers what is returned, error and truncation behavior, name-matching caveats, and how to proceed when the type name is unknown — enough for an agent to call correctly without an output schema. Nothing material is missing for a read-only query tool of this complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: memberName additionally marks which listed types declare that member (useful for finding overrides), and typeName matching rules (namespace prefix and type arguments ignored) clarify behavior the schema only hints at. direction and includeTests semantics are left largely to the schema.

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: 'Shows a type's whole inheritance tree in one call', and enumerates both directions (implementers/subclasses and bases/interfaces) plus the returned fields (kind, file, line). It also separates itself from siblings by naming code_callers for call sites and code_search for unknown names.

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?

An explicit WHEN TO USE block names the concrete triggers (before changing a base type/member, answering 'who implements X') and routes to the correct alternative tools for call sites and name lookups. Exclusions are explicit rather than implied.

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