Skip to main content
Glama

Discover consumer usage

discover_consumer_usage

Scan consumer source code for provider API calls, capture file-and-line evidence, and draft the consumers.yaml entry covering HTTP, GraphQL, gRPC, SOAP, and AsyncAPI usage.

Instructions

Scan a consumer service's source code (inside the project) for calls to the provider, with file and line as evidence, and draft its consumers.yaml entry. HTTP paths, GraphQL query documents (exact fields read), gRPC stub calls, SOAP client calls, and AsyncAPI topic names.

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": {
      "consumer_dir": "<consumer_dir>",
      "spec": "<spec>"
    },
    "name": "discover_consumer_usage"
  }
}

Input Schema

NameRequiredDescriptionDefault
specYes
consumer_dirYes
consumer_nameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.7/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden, and it leaves a critical ambiguity: it says the tool 'drafts its consumers.yaml entry' without stating whether a file is written or the draft is merely returned. It does disclose the analysis approach (static source scan) and the evidence format (file and line), but omits mutation semantics, idempotency, and performance scope.

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 dense sentences, front-loaded with the action and scope, followed by the protocol enumeration. No filler; the enumeration of supported call types earns its space, though it slightly crowds out parameter explanation.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a three-parameter tool with no output schema, no annotations, and zero schema descriptions, the definition is thin: it neither clarifies the required 'spec'/'consumer_dir' inputs nor describes the return payload or whether files are modified. The agent has enough to know what the tool does but not enough to call it confidently.

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

Parameters2/5

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

Schema description coverage is 0% for all three parameters, so the description must compensate and largely fails. 'consumer_dir' is only loosely implied by 'inside the project', 'spec' is never explained, and the optional nullable 'consumer_name' is not mentioned at all.

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?

States a specific verb (scan) and resource (consumer service source code), then enumerates what it looks for (HTTP paths, GraphQL documents, gRPC/SOAP calls, AsyncAPI topics) and the artifact it produces (consumers.yaml entry). This is clearly distinguishable from siblings like diff_contracts or check_live_conformance, though it never names an alternative explicitly.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance, and no routing to alternatives such as check_live_conformance or list_operations. Usage is only implied by the phrase 'inside the project', leaving the agent to infer that this is the static-discovery step before conformance checking.

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