Skip to main content
Glama

Generate REST call code

pc_generate_call
Read-onlyIdempotent

Generate ready-to-adapt code for Partner Center REST scenarios in your chosen language, including token exchange, retry, polling, and pagination boilerplate. Returns code as text; never executes.

Instructions

Emit ready-to-adapt code for one Partner Center scenario in the language you ask for, plus the Secure Application Model token exchange, 429 retry, 202 polling, and pagination boilerplate. Use this when you want code. For a structured method/url/headers/body object to send yourself, use pc_build_request; for the underlying facts and gotchas, use pc_get_scenario. Only current REST is emitted — never the archived .NET SDK. Read-only, offline, deterministic: the code is returned as text and is never executed, and the placeholder credentials it contains are read from environment variables at your end. An unknown id returns ok:false with suggestions listing every valid id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesExact scenario id in kebab-case, e.g. "create-cart". Case-sensitive; discover ids with pc_list_scenarios or any pc_plan_* tool.
languageYesTarget language for the snippet. Required — there is no default. "curl", "csharp", and "typescript" come from curated per-scenario examples; "powershell" is generated from the endpoint definition and is therefore more skeletal.
includeHelpersNoWhether to append the reusable boilerplate — token exchange, 429/Retry-After handling, 202 polling, pagination — as a separate `helpers` field. Defaults to true. Set false when you already have that plumbing and only want the call itself.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesTrue when the call succeeded and `data` is populated; false when `error` explains why not.
dataNoThe result payload. Present only when `ok` is true.
errorNoHuman-readable reason the call failed. Present only when `ok` is false.
suggestionsNoValid values to retry with, returned alongside `error` when the requested identifier was not found.
Behavior5/5

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

Annotations already mark the tool as read-only, idempotent, and non-destructive, and the description adds substantial context: 'Read-only, offline, deterministic,' 'the code is returned as text and is never executed,' placeholder credentials from environment variables, and the specific error behavior for unknown ids returning suggestions. This goes well beyond the structured annotations.

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 four dense sentences, each adding unique value: purpose, when to use and alternatives, behavioral constraints, and error behavior. It is front-loaded with the core action and contains no redundant or filler content.

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 the tool complexity, the output schema, and full parameter documentation, the description is complete: it covers purpose, usage timing, explicit alternatives, safety/behavior, and error handling. No essential guidance is missing for an AI agent to select and invoke 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?

The input schema describes all three parameters with detailed semantics, including an enum for language and a note that powershell is more skeletal. Since schema coverage is 100%, the description adds little beyond the schema, so baseline 3 is appropriate.

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 opens with 'Emit ready-to-adapt code for one Partner Center scenario in the language you ask for', providing a specific verb and resource. It distinguishes itself from siblings by explicitly naming pc_build_request and pc_get_scenario, and by noting only current REST is emitted, never the archived .NET SDK.

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?

States 'Use this when you want code' and explicitly directs users to alternatives: 'For a structured method/url/headers/body object to send yourself, use pc_build_request; for the underlying facts and gotchas, use pc_get_scenario.' It also sets a clear exclusion with 'Only current REST is emitted — never the archived .NET SDK.'

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tunahanaliozturk/partner-center-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server