Skip to main content
Glama

Decode a raw error response

pc_decode_error
Read-onlyIdempotent

Decode a Partner Center error response to extract error code, HTTP status, MS-CorrelationId, and get documented causes, remediation, and exact support-request wording. Use it as the first step when an API call fails.

Instructions

Take a raw Partner Center error response and decode it: extract the error code, HTTP status, and MS-CorrelationId, then return the documented causes, remediation, likely scenarios, and the exact wording to quote in a support request. This is the right first tool when something failed and you have the response in hand. Use pc_lookup_error instead when you have already isolated a clean code, and pc_diagnose when you only have a prose description with no response body. Read-only, offline, deterministic parsing — the input is never sent anywhere and no request is replayed. Always returns ok:true: an unrecognised code still yields the parsed fields, status-based candidates, and a note on what to try next.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorYesThe error response pasted verbatim — a JSON body such as {"code":"900400","description":"..."}, or unstructured log text containing the failure. Include the response headers if you have them so the MS-CorrelationId can be recovered. Partial or malformed input is handled: whatever cannot be parsed is reported as null.

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.
Behavior5/5

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

Beyond the annotations (readOnlyHint, idempotentHint, destructiveHint), the description discloses that the tool is offline and deterministic, never sends input anywhere, and never replays requests. It also explains the edge-case behavior of always returning ok:true with parsed fields and a note for unrecognized codes. This adds behavioral context well beyond what annotations provide.

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 dense but every sentence earns its place: purpose, usage trigger, alternatives, behavioral guarantees, and return behavior. It is front-loaded with the core purpose and uses concise language without redundancy.

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's complexity (handles raw, partial, or malformed input) and that an output schema exists, the description nevertheless covers input expectations, output guarantees (always ok:true), and follow-up guidance (note with next steps). It is fully self-contained for an agent to decide when and how to invoke it.

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 has 100% coverage, with a detailed description of the 'error' parameter covering verbatim input, JSON or unstructured text, headers, and malformed input handling. The tool description itself does not add significant meaning about the parameter beyond what the schema already states, 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 a specific verb ('decode') and resource ('raw Partner Center error response'), and details exactly what is extracted (error code, HTTP status, MS-CorrelationId) and returned (causes, remediation, scenarios, support wording). It explicitly distinguishes from sibling tools like pc_lookup_error and pc_diagnose, making the tool's unique role unambiguous.

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?

It states the intended usage context: 'the right first tool when something failed and you have the response in hand.' It also provides clear exclusion criteria by naming alternatives (use pc_lookup_error when you have a clean code, pc_diagnose when you have only a prose description). This is textbook when-to-use guidance.

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