Skip to main content
Glama

event_contract

Read-onlyIdempotent

Design event contracts for named business events, covering envelope fields, schema evolution, idempotency, ordering, DLQ, and replay decisions. Outputs a deterministic template with open questions.

Instructions

Design an event contract: envelope fields, schema evolution rules, idempotency, ordering, DLQ and replay decisions for a named business event. Deterministic template with open questions.

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": {
      "eventName": "<eventName>",
      "producer": "<producer>",
      "consumers": "<consumers>",
      "payloadFields": "<payloadFields>"
    },
    "name": "event_contract"
  }
}

Input Schema

NameRequiredDescriptionDefault
orderingNoper-key
producerYes
consumersYes
eventNameYes
payloadFieldsYes
deliveryGuaranteeNoat-least-once

Output Schema

NameRequiredDescriptionDefault
kindNo
rulesNo
sourcesNo
envelopeNo
warningsNo
consumersNo
eventNameNo
nextToolsNo
validatedNo
jsonSchemaNo
limitationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.5.0
    • removedInput schema / properties / payloadFields / items / additionalProperties
      Removed value: -false
    • changedInput schema / properties / payloadFields / items / required
      Previous value: -[
      -  "name",
      -  "type",
      -  "required",
      -  "pii"
      -]New value: +[
      +  "name",
      +  "type"
      +]
    • changedInput schema / required
      Previous value: -[
      -  "eventName",
      -  "producer",
      -  "consumers",
      -  "payloadFields",
      -  "ordering",
      -  "deliveryGuarantee"
      -]New value: +[
      +  "eventName",
      +  "producer",
      +  "consumers",
      +  "payloadFields"
      +]
  2. First observedv0.4.1

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint=false and destructiveHint=false, so the safety profile is covered. The description adds genuinely new behavioral context: the output is a 'deterministic template with open questions', which signals to the agent that the result is a scaffold containing unresolved decisions rather than a final design, and that repeated calls are stable.

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?

Two sentences, no filler, with the scope list front-loaded and the output-character note second. Every phrase carries information.

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 an output schema present, the description needn't explain returns, and it correctly frames scope and the templated, open-question nature of the result. The remaining gap is that required inputs (producer, consumers, payloadFields) are not tied to the description, but the tool's overall shape is clear.

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 0%, so the description must carry parameter meaning. It partly does, naming ordering, envelope fields and payload concerns, but producer, consumers, deliveryGuarantee and the schema-evolution inputs are never mapped. The structured enums and self-describing property names limit the damage, so a middle score fits.

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?

The description gives a specific verb ('Design') plus the resource ('event contract') and enumerates the design dimensions covered: envelope fields, schema evolution, idempotency, ordering, DLQ and replay. It is clearly distinct from nearby tools such as retry_policy or integration_config, though it names no sibling explicitly.

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?

Usage is implied by 'for a named business event', which tells the agent the trigger condition, but there is no explicit when-to-use versus alternatives (e.g. integration_config or retry_policy) and no when-not guidance. An agent can infer the right situation but must guess at the boundary.

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