Skip to main content
Glama

build-get_domain_metadata

Fetch the emitted DomainMetadata JSON for one declaration, giving code generators the fields, actions, events, relationships and system flags as authoritative AST data, plus schemaVersion and sourceDigest.

Instructions

Fetch the DomainMetadata JSON the annotation processor emitted for one declaration of this project — the authoritative AST the code generators consume, including fields, actions, events, relationships and the system-field flags. name is the Java simple name (e.g. 'Station'), as listed by build-list_domains. Returns the record verbatim, plus the schemaVersion and (when the build could compute one) the ADR-042 sourceDigest.

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": {
      "name": "<name>"
    },
    "name": "build-get_domain_metadata"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNoWhich kind of declaration to read. Defaults to 'domain'.
nameYesJava simple name of the entity, enum, capability or view.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.9.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does reasonably well: 'Fetch' implies a read, and it discloses the return shape (record verbatim, plus schemaVersion, plus conditionally a sourceDigest when the build could compute one). The conditional nature of sourceDigest is a genuinely useful disclosure; it stops short of stating whether reads are side-effect free or what happens for an unknown name or wrong kind.

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?

Two sentences, front-loaded with what is fetched before the parenthetical detail of contents. The contents list ('fields, actions, events, relationships and the system-field flags') is informative rather than filler, though the ADR-042 parenthetical is slightly dense.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/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 explain returns and it does: verbatim record, schemaVersion, and conditionally sourceDigest. Combined with full schema coverage, an agent has enough to call it correctly; only kind-selection edge cases and behavior on an unknown name are unaddressed.

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%, so the schema already documents both parameters, including the kind enum and its 'domain' default. The description adds an example ('Station') and a cross-reference to build-list_domains for name, but says nothing about the kind parameter, which is the one place additional semantics (e.g. when a name collides across kinds) would have helped.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb and resource ('Fetch the DomainMetadata JSON ... for one declaration of this project') and scopes it precisely, plus tells the agent what the payload is (the authoritative AST code generators consume). It does not explicitly differentiate itself from the similarly-purposed sibling lsp-describe_domain, so it falls short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a workflow anchor by saying the name is 'as listed by build-list_domains', which tells the agent where to get valid inputs. However, it never states when to prefer this over lsp-describe_domain or build-explain_artefacts, nor any when-not conditions, so guidance is implied rather than explicit.

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