Skip to main content
Glama

build_get_service_contract

Read-only

Fetch the AUTHORITATIVE contract for a transactional/stateful platform service (cart, order, payment, booking, appointment, membership, approval, document_signature, recurring_plan, inventory, task, ticket, loyalty_points, rental, comment, attachment, feedback, notification, product, service, customer, workflows). Returns the service's state machine (initial_state + transitions), its operations (op ids + input fields + resulting state), the base schemas + mandatory fields you must supply, AND the platform's DEFAULT UI SCHEMAS for that service — the bulletproof reference for building a correct, sophisticated transactional UI. ALWAYS call this for any service your app extends BEFORE authoring its UI — do not guess op names, states, or mandatory fields from prose. service_id='index' (default) lists all services.

Input Schema

NameRequiredDescriptionDefault
partsNoWhat to return (default 'both'): 'contract' = state machine/ops/schemas; 'ui_schemas' = default UI only.
service_idNoThe service id (e.g. 'cart', 'booking', 'payment'); 'index' (default) lists all.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds genuine context: it discloses that results are authoritative versus prose, that service_id='index' enumerates all services, and that the 'parts' switch controls whether contract, UI schemas, or both come back. Error behavior and response shape are not mentioned, but with no output schema and strong annotations a 4 is fair.

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?

Front-loaded with the verb and resource, then the key behavioral guidance (authoritative, call before UI authoring). The 22-name parenthetical service list is somewhat heavy and reads as scope-setting rather than noise, so it earns its place, but the paragraph is dense and could be split.

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?

With no output schema, the description must carry the return-value burden, and it does: it names exactly what comes back (initial_state + transitions, op ids, input fields, resulting state, base schemas, mandatory fields, default UI schemas). The remaining gap is failure modes and the shape of the index response.

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% and both parameters, including the 'parts' enum values, are already documented in the schema. The description only restates the 'index' default and the deep-link purpose of the tool, adding no syntax or format details beyond structured fields. Baseline 3 under high coverage applies.

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 ('Fetch') and a precisely scoped resource ('the AUTHORITATIVE contract for a transactional/stateful platform service'), then enumerates the returned payload: state machine, operations, base schemas, and default UI schemas. No sibling tool (schema_get, build_list_capabilities, build_get_examples) returns this combination, so the agent can differentiate without opening schemas.

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 imperative with sequencing: 'ALWAYS call this for any service your app extends BEFORE authoring its UI', plus an explicit prohibition against inferring op names, states, or mandatory fields from prose. The 'index' default is documented so the agent knows how to discover valid service IDs first. Only weakness is that no alternate tool is named, but the when/when-not guidance is unambiguous.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.