Skip to main content
Glama

Map archived SDK calls to REST

pc_migrate_from_sdk
Read-onlyIdempotent

Map archived Partner Center .NET SDK calls to REST replacements with migration notes, so you can port code off the retired SDK.

Instructions

Find the archived Partner Center .NET SDK calls in a snippet and map each one to the current REST scenario that replaces it, with migration notes. Use this to port code off the SDK, which was archived in June 2023. Run pc_check_auth alongside it to catch retired auth in the same snippet, then pass each returned scenario id to pc_generate_call to emit the replacement code. Read-only, offline, deterministic pattern matching: the snippet is not executed and nothing is rewritten in place — you get the mapping, not modified code. Always returns ok:true; when nothing matched, matches is empty and unmatched is true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesC# code that calls the archived SDK, pasted as-is — e.g. a block using IAggregatePartner or PartnerService.Instance. A fragment is enough; matching is on the SDK call chain and is case-insensitive. Multiple calls in one snippet each get their own entry.

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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.18.0
    • changedOutput schema / properties / data / properties / matches / items / properties / scenario / properties / api / enum
      Previous value: -[
      -  "partner-center",
      -  "graph",
      -  "pricing-and-referrals"
      -]New value: +[
      +  "partner-center",
      +  "graph",
      +  "pricing-and-referrals",
      +  "customer-service-admin"
      +]
  2. Changed3 schema fields changedv0.13.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / code / description
      Added value: +"C# code that calls the archived SDK, pasted as-is — e.g. a block using IAggregatePartner or PartnerService.Instance. A fragment is enough; matching is on the SDK call chain and is case-insensitive. Multiple calls in one snippet each get their own entry."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {
      +      "additionalProperties": false,
      +      "description": "The result payload. Present only when `ok` is true.",
      +      "properties": {
      +        "matches": {
      +          "description": "One entry per recognised SDK call. Empty when the snippet used no known SDK pattern.",
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "notes": {
      +                "description": "What changes in the move to REST: renamed fields, behavioural differences, extra steps.",
      +                "type": "string"
      +              },
      +              "scenario": {
      +                "additionalProperties": false,
      +                "description": "The full REST scenario that replaces this SDK call.",
      +                "properties": {
      +                  "api": {
      +                    "description": "Which API surface hosts this operation. Absent means \"partner-center\". GDAP and reconciliation-v2 operations are \"graph\" and need a different token audience.",
      +                    "enum": [
      +                      "partner-center",
      +                      "graph",
      +                      "pricing-and-referrals"
      +                    ],
      +                    "type": "string"
      +                  },
      +                  "area": {
      +                    "description": "Functional area of the Partner Center API this operation belongs to.",
      +                    "enum": [
      +                      "customers",
      +                      "subscriptions",
      +                      "orders",
      +                      "licenses",
      +                      "invoicing",
      +                      "profiles",
      +                      "auth",
      +                      "catalog",
      +                      "utilities",
      +                      "audit",
      +                      "support",
      +                      "security",
      +                      "analytics",
      +                      "devices",
      +                      "referrals"
      +                    ],
      +                    "type": "string"
      +                  },
      +                  "authType": {
      +                    "description": "Token flavour the operation requires. \"app+user\" needs the Secure Application Model refresh-token flow.",
      +                    "enum": [
      +                      "app-only",
      +                      "app+user"
      +                    ],
      +                    "type": "string"
      +                  },
      +                  "docUrl": {
      +                    "description": "Microsoft Learn page documenting this operation.",
      +                    "format": "uri",
      +                    "type": "string"
      +                  },
      +                  "examples": {
      +                    "additionalProperties": false,
      +                    "description": "Ready-to-adapt request examples per language.",
      +                    "properties": {
      +                      "csharp": {
      +                        "description": "C# HttpClient snippet.",
      +                        "type": "string"
      +                      },
      +                      "curl": {
      +                        "description": "Runnable curl invocation.",
      +                        "type": "string"
      +                      },
      +                      "typescript": {
      +                        "description": "TypeScript fetch snippet.",
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "curl",
      +                      "csharp",
      +                      "typescript"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "gotchas": {
      +                    "description": "Pitfalls that commonly break this call in practice, most consequential first.",
      +                    "items": {
      +                      "type": "string"
      +                    },
      +                    "type": "array"
      +                  },
      +                  "headers": {
      +                    "description": "Request headers this operation expects.",
      +                    "items": {
      +                      "additionalProperties": false,
      +                      "properties": {
      +                        "name": {
      +                          "description": "Header name.",
      +                          "type": "string"
      +                        },
      +                        "note": {
      +                          "description": "What to put in the header and why.",
      +                          "type": "string"
      +                        },
      +                        "required": {
      +                          "description": "Whether the call fails without it.",
      +                          "type": "boolean"
      +                        }
      +                      },
      +                      "required": [
      +                        "name",
      +                        "required"
      +                      ],
      +                      "type": "object"
      +                    },
      +                    "type": "array"
      +                  },
      +                  "id": {
      +                    "description": "Stable kebab-case identifier, e.g. \"create-cart\". Pass this to pc_get_scenario, pc_generate_call, or pc_build_request.",
      +                    "type": "string"
      +                  },
      +                  "lastVerified": {
      +                    "description": "YYYY-MM-DD on which this entry was last checked against the live documentation.",
      +                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +                    "type": "string"
      +                  },
      +                  "method": {
      +                    "description": "HTTP verb for the call.",
      +                    "enum": [
      +                      "GET",
      +                      "POST",
      +                      "PUT",
      +                      "PATCH",
      +                      "DELETE",
      +                      "HEAD"
      +                    ],
      +                    "type": "string"
      +                  },
      +                  "path": {
      +                    "description": "API-relative path with {placeholder} segments, e.g. \"/v1/customers/{customer-id}/subscriptions\". Resolve it against the base URL for `api`.",
      +                    "type": "string"
      +                  },
      +                  "requestFields": {
      +                    "description": "Per-field documentation for the request body, when the operation takes one.",
      +                    "items": {
      +                      "additionalProperties": false,
      +                      "properties": {
      +                        "name": {
      +                          "description": "Field path within the request body; \"[]\" marks an array hop, e.g. \"lineItems[].catalogItemId\".",
      +                          "type": "string"
      +                        },
      +                        "note": {
      +                          "description": "Constraints, accepted values, or gotchas for this field.",
      +                          "type": "string"
      +                        },
      +                        "required": {
      +                          "description": "Whether the request is rejected without it.",
      +                          "type": "boolean"
      +                        },
      +                        "type": {
      +                          "description": "Declared type of the field.",
      +                          "type": "string"
      +                        }
      +                      },
      +                      "required": [
      +                        "name",
      +                        "type",
      +                        "required"
      +                      ],
      +                      "type": "object"
      +                    },
      +                    "type": "array"
      +                  },
      +                  "requestShape": {
      +                    "anyOf": [
      +                      {
      +                        "type": "string"
      +                      },
      +                      {
      +                        "type": "null"
      +                      }
      +                    ],
      +                    "description": "JSON body template, or null for operations that take no body."
      +                  },
      +                  "responseShape": {
      +                    "anyOf": [
      +                      {
      +                        "type": "string"
      +                      },
      +                      {
      +                        "type": "null"
      +                      }
      +                    ],
      +                    "description": "JSON response template, or null when the operation returns no body."
      +                  },
      +                  "title": {
      +                    "description": "Human-readable name of the operation.",
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "id",
      +                  "area",
      +                  "title",
      +                  "method",
      +                  "path",
      +                  "authType",
      +                  "headers",
      +                  "requestShape",
      +                  "responseShape",
      +                  "examples",
      +                  "gotchas",
      +                  "docUrl",
      +                  "lastVerified"
      +                ],
      +                "type": "object"
      +              },
      +              "sdkPattern": {
      +                "description": "The archived SDK call chain that was recognised.",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "sdkPattern",
      +              "notes",
      +              "scenario"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "unmatched": {
      +          "description": "True when nothing was recognised — either the code does not use the archived SDK, or the call is not in the mapping table. Try pc_search_docs in that case.",
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "matches",
      +        "unmatched"
      +      ],
      +      "type": "object"
      +    },
      +    "error": {
      +      "description": "Human-readable reason the call failed. Present only when `ok` is false.",
      +      "type": "string"
      +    },
      +    "ok": {
      +      "description": "True when the call succeeded and `data` is populated; false when `error` explains why not.",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "ok"
      +  ],
      +  "type": "object"
      +}
  3. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

The description adds meaningful behavioral context beyond the annotations: it is 'read-only, offline, deterministic pattern matching', the snippet is not executed, and nothing is rewritten in place. It also discloses the return contract — always ok:true, with empty `matches` and `unmatched:true` when nothing matches. No contradiction with the readOnlyHint/idempotentHint 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 sentences, front-loaded with the purpose, followed by workflow and behavioral guarantees. Every sentence earns its place, and there is no filler or redundant restatement of the title beyond a natural subject line. It is information-dense but still easy to scan.

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 single-parameter tool with an output schema, the description is complete: it covers why to use it, how to chain it with other tools, what it does and does not modify, and what the empty-result response looks like. The agent has everything needed to invoke it correctly and interpret the outcome.

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 is 100% covered, including details like case-insensitive matching and multiple calls per snippet, so the tool description does not need to add parameter-specific semantics. It does include 'snippet' and 'each one', but those largely repeat what the schema already says. Baseline 3 is appropriate because the schema carries the parameter documentation burden.

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 action — 'Find the archived Partner Center .NET SDK calls in a snippet and map each one to the current REST scenario' — clearly identifying the resource and the transformation. It also distinguishes itself from sibling tools by naming pc_check_auth and pc_generate_call as complementary steps, making the purpose 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 explicitly states when to use the tool ('Use this to port code off the SDK') and describes a workflow with pc_check_auth and pc_generate_call. The alternative tools are named, so an agent can decide whether to run this tool or a sibling. This is exactly the kind of guidance needed for correct tool selection.

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