Skip to main content
Glama

accept_offer

Idempotent

Accept the offer on behalf of the buyer. Needs credentials. This locks the billing identity, the offer version and the hash of the terms as they stand at this moment. A later change to the website cannot pass for what was agreed. The request must come from a verified robot. Errors: KYA_VERIFICATION_REQUIRED or KYA_REVOKED (403) without it, OFFER_CHANGED (409) if the offer or the terms changed since you read them; read order_status and use the new values. OFFER_EXPIRED (409) 30 days after the order. MANUAL_OFFER_REQUIRED (409) while a person has not priced the service yet.

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": {
      "order": "<order>",
      "accessToken": "<accessToken>",
      "offerVersion": "<offerVersion>",
      "termsHash": "<termsHash>",
      "billing": "<billing>"
    },
    "name": "accept_offer"
  }
}

Input Schema

NameRequiredDescriptionDefault
orderYesThe order id returned by create_order.
secretNoRequired unless you authenticate with the Authorization header (Bearer clientId:secret, or an OAuth access token issued for this server). The secret returned by register_agent.
billingYesThe buyer as it will appear on the invoice and the contract. For type company, company, registration and representative are also required. For type person, leave out company, registration, vat and representative. No other keys are accepted.
clientIdNoRequired unless you authenticate with the Authorization header (Bearer clientId:secret, or an OAuth access token issued for this server). The clientId returned by register_agent.
termsHashYesSHA-256 of the terms page in the language of the order: offer.terms[language].hash from the order, copied exactly. Sending it confirms that the buyer accepts those terms.
accessTokenYesThe accessToken returned by create_order.
offerVersionYesoffer.version from the order, copied exactly.
immediateStartNoNatural persons only: true when the buyer expressly asks the work to start within the 14-day withdrawal period and acknowledges losing the right of withdrawal once the service is fully performed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / clientId / description
      Previous value: -"Required unless you authenticate with the Authorization header (Bearer <clientId>:<secret>, or an OAuth access token issued for this server). The clientId returned by register_agent."New value: +"Required unless you authenticate with the Authorization header (Bearer clientId:secret, or an OAuth access token issued for this server). The clientId returned by register_agent."
    • changedInput schema / properties / secret / description
      Previous value: -"Required unless you authenticate with the Authorization header (Bearer <clientId>:<secret>, or an OAuth access token issued for this server). The secret returned by register_agent."New value: +"Required unless you authenticate with the Authorization header (Bearer clientId:secret, or an OAuth access token issued for this server). The secret returned by register_agent."
    • changedInput schema / properties / termsHash / description
      Previous value: -"SHA-256 of the terms page in the language of the order: offer.terms.<language>.hash from the order, copied exactly. Sending it confirms that the buyer accepts those terms."New value: +"SHA-256 of the terms page in the language of the order: offer.terms[language].hash from the order, copied exactly. Sending it confirms that the buyer accepts those terms."
  2. Changed1 schema field changed
    • addedInput schema / properties / immediateStart
      Added value: +{
      +  "description": "Natural persons only: true when the buyer expressly asks the work to start within the 14-day withdrawal period and acknowledges losing the right of withdrawal once the service is fully performed.",
      +  "type": "boolean"
      +}
  3. Changed12 schema fields changed
    • addedInput schema / properties / accessToken / description
      Added value: +"The accessToken returned by create_order."
    • addedInput schema / properties / billing / additionalProperties
      Added value: +false
    • changedInput schema / properties / billing / description
      Previous value: -"type (person or company), fullName or company with eik, email, country, city, address, phone."New value: +"The buyer as it will appear on the invoice and the contract. For type company, company, registration and representative are also required. For type person, leave out company, registration, vat and representative. No other keys are accepted."
    • addedInput schema / properties / billing / if
      Added value: +{
      +  "properties": {
      +    "type": {
      +      "const": "company"
      +    }
      +  }
      +}
    • addedInput schema / properties / billing / properties
      Added value: +{
      +  "address": {
      +    "maxLength": 250,
      +    "minLength": 3,
      +    "type": "string"
      +  },
      +  "city": {
      +    "maxLength": 100,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "company": {
      +    "description": "Company only. Registered name.",
      +    "maxLength": 200,
      +    "minLength": 2,
      +    "type": "string"
      +  },
      +  "country": {
      +    "description": "ISO 3166-1 alpha-2 code, for example BG.",
      +    "pattern": "^[A-Za-z]{2}$",
      +    "type": "string"
      +  },
      +  "email": {
      +    "maxLength": 254,
      +    "type": "string"
      +  },
      +  "fullName": {
      +    "description": "Full name of the buyer, or of the contact person for a company.",
      +    "maxLength": 150,
      +    "minLength": 3,
      +    "type": "string"
      +  },
      +  "phone": {
      +    "description": "Optional.",
      +    "maxLength": 40,
      +    "minLength": 5,
      +    "type": "string"
      +  },
      +  "registration": {
      +    "description": "Company only. Company registration number; for country BG the 9- or 13-digit EIK.",
      +    "maxLength": 40,
      +    "minLength": 4,
      +    "type": "string"
      +  },
      +  "representative": {
      +    "description": "Company only. The person who legally represents the company.",
      +    "maxLength": 150,
      +    "minLength": 3,
      +    "type": "string"
      +  },
      +  "type": {
      +    "enum": [
      +      "person",
      +      "company"
      +    ],
      +    "type": "string"
      +  },
      +  "vat": {
      +    "description": "Company only. Optional VAT number.",
      +    "maxLength": 40,
      +    "minLength": 4,
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / billing / required
      Added value: +[
      +  "type",
      +  "fullName",
      +  "email",
      +  "country",
      +  "city",
      +  "address"
      +]
    • addedInput schema / properties / billing / then
      Added value: +{
      +  "required": [
      +    "company",
      +    "registration",
      +    "representative"
      +  ]
      +}
    • changedInput schema / properties / clientId / description
      Previous value: -"Your client identifier, if not sent in the Authorization header."New value: +"Required unless you authenticate with the Authorization header (Bearer <clientId>:<secret>, or an OAuth access token issued for this server). The clientId returned by register_agent."
    • addedInput schema / properties / offerVersion / description
      Added value: +"offer.version from the order, copied exactly."
    • addedInput schema / properties / order / description
      Added value: +"The order id returned by create_order."
    • changedInput schema / properties / secret / description
      Previous value: -"Your secret, if not sent in the Authorization header."New value: +"Required unless you authenticate with the Authorization header (Bearer <clientId>:<secret>, or an OAuth access token issued for this server). The secret returned by register_agent."
    • addedInput schema / properties / termsHash / description
      Added value: +"SHA-256 of the terms page in the language of the order: offer.terms.<language>.hash from the order, copied exactly. Sending it confirms that the buyer accepts those terms."
  4. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations, the description explains that accepting locks the billing identity, offer version, and terms hash, and that later website changes cannot substitute for the accepted terms. It also documents the important failure modes with HTTP status codes and their meanings.

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?

The description is front-loaded with the core action and locking behavior, then follows with concise error guidance. Every sentence contributes useful operational detail for a complex mutation.

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

Completeness5/5

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

Given a complex mutation with nested billing data and no output schema, the description covers the critical preconditions, locking semantics, expiry, manual-review state, and actionable error handling. No major behavioral gap remains for an agent to call it 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 every parameter in detail. The description adds meaningful context by saying the offer version, terms hash, and billing identity are locked at acceptance, but it does not add much per-parameter meaning beyond the schema.

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 states a specific verb and resource: accept the offer on behalf of the buyer. It does not explicitly distinguish this action from siblings like create_order or start_payment, but the purpose is still unmistakable.

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

Usage Guidelines4/5

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

It gives strong preconditions (credentials and verified robot status) and tells the agent exactly what to do on OFFER_CHANGED by reading order_status. It does not explicitly say when to choose this tool over all siblings, but the operational context is clear.

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.

Resources