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

TableJSON 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 declare readOnlyHint=true, and the description does not contradict this. The description adds significant behavioral context beyond the annotation: it details what the tool returns (state machine, operations, schemas, UI schemas) and emphasizes that it is the 'bulletproof reference.' It does not mention potential errors or performance, but for a read-only tool, this is sufficient. The description adds value over the annotation.

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?

The description is long but every sentence carries value: it states the purpose, enumerates services, lists return contents, gives a strong usage directive, and explains defaults. It is front-loaded with the core purpose. The redundancy in 'ALWAYS call' and 'do not guess' reinforces but is not excessive. Structure is logical, moving from purpose to content to usage. It could be slightly tighter, but it earns a 4.

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?

Given the tool's complexity (multiple return components, no output schema), the description is fairly complete: it explains what is returned and when to use it. It does not describe error handling or output format details, but for a read-only contract fetch with well-defined parameters, this is adequate. The description covers the essential information an agent needs to call the tool 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 the input schema already documents both parameters with descriptions. The description adds minor clarifications: it mentions service_id='index' default and gives examples of service IDs, and it explains the parts parameter's meaning ('contract' vs 'ui_schemas'). However, this largely duplicates the schema descriptions. Since the schema does the heavy lifting, the description adds limited new semantic value, meriting the baseline score of 3.

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?

The description clearly states the verb 'Fetch' and the specific resource: the authoritative contract for transactional/stateful platform services. It enumerates service types and explicitly lists what is returned (state machine, operations, schemas, UI schemas), making it unambiguous. It distinguishes itself from sibling tools like build_get_bundle or build_get_project by focusing on service contracts, so an agent can easily differentiate it.

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?

The description provides explicit usage instructions: 'ALWAYS call this for any service your app `extends` BEFORE authoring its UI' and warns against guessing. It also explains the default behavior of service_id='index' and the parts parameter. This is clear when-to-use guidance and implies when not to use it (e.g., when not extending a service). It does not name specific alternatives, but the instruction is strong enough to route the agent correctly.

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.