Skip to main content
Glama

Call marketplace API

execute
Destructive

Calls this organization's marketplace APIs with JavaScript. Use search first to find the operation and its parameters.

Write an async arrow function that returns the result. In it, await codemode.request({ method, path, query?, body?, contentType?, rawBody? }) sends one request (method: GET, POST, PUT, PATCH or DELETE) and returns the response; await codemode.spec() returns the spec.

Example: async () => { const res = await codemode.request({ method: "GET", path: "/otto//v4/orders", query: { limit: 10 } }); return res; }

Customer data is anonymized: names, companies, addresses (except country), emails, phones and customer IDs read "[anonymized]". Do not work around it.

Your marketplace connections

  • kaufland-de — Kaufland (PLAYGROUND, test data)

  • home24-dev — Mirakl "home24-dev"

  • otto-main — OTTO Market "OTTO Market" (SANDBOX)

Paths

All paths are /{platform}/{connection}/<upstream API path>, e.g. /kaufland/kaufland-de/v2/order-units, /mirakl/home24-dev/api/orders, /otto/otto-main/v4/orders. Put query parameters in query, never in the path. The host adds authentication; never send credentials.

Rules

  • Responses are capped at ~6,000 tokens: filter, map and aggregate in your code and return only what is needed.

  • List endpoints are paginated with small default page sizes: when the user wants all results, loop over the pages in your code.

  • Operations carry x-write (mutates data), x-async (returns an ID to poll via statusOperationId), x-rate-limit and x-body-encoding.

  • Writes are audited and may be disabled per organization.

  • Before paginated reads, imports, writes or file downloads, read the platform notes in (await codemode.spec()).info.description.

  • For a marketplace not listed above, ads on Mirakl marketplaces (platform "mirakl_ads"), or an authentication error, call list_integrations for a setup or fix link.

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": {
      "code": "<code>",
      "context": "<context>",
      "llm_model": "<llm_model>"
    },
    "name": "execute"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesJavaScript async arrow function to execute
contextYesExplain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as "a user", "the customer", or "an account". Example: "Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution."
llm_modelYesThe exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
conversation_idNoPass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations (readOnly=false, destructive=true, openWorld, non-idempotent), the description discloses substantial behavior: customer data is anonymized and must not be circumvented, responses are capped at ~6,000 tokens, list endpoints are paginated, host injects authentication, writes are audited and may be disabled per organization, and operations carry x-write/x-async/x-rate-limit/x-body-encoding markers. This is far richer than the annotations and directly shapes correct invocation.

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 core purpose and organized under clear headers (Example, Paths, Rules), which makes a long description navigable. Nearly every sentence carries operational weight, though the connection list and some directives are verbose enough that not every line is maximally tight.

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?

For a high-complexity, open-ended code-execution tool with no output schema, the description covers the essentials an agent needs: auth handling, path construction, pagination, output truncation, write risks, anonymization constraints, and escalation paths. Coverage is complete for the tool's complexity.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description nonetheless adds real meaning about the `code` parameter by specifying the async arrow-function contract, the codemode.request/codemode.spec APIs, the method enum, and a worked example. It does not reinforce the critical `conversation_id` threading requirement (that lives only in the schema), which keeps it below a 5.

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 and resource: 'Calls this organization's marketplace APIs with JavaScript.' It immediately distinguishes itself from the `search` sibling by directing discovery there first, and it explains the exact request mechanism (codemode.request). An agent can tell precisely what this tool does and when to reach for 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?

Explicitly routes the agent: 'Use search first to find the operation and its parameters,' and names concrete alternatives for edge cases — `list_integrations` for unlisted marketplaces, Mirakl ads, or auth errors. It also states prerequisites (read platform notes before writes/paginated reads) and describes how to handle all-results requests via a loop. When/when-not/alternatives are all covered.

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.