Skip to main content
Glama

create_mcp_integration

Create a Portkey MCP integration for an external server URL, selecting HTTP/SSE transport and auth via headers or secret references. Returns integration ID and slug.

Instructions

Create a Portkey integration for an external MCP server URL. For headers auth, provide custom_headers or a Secret Reference mapping targeting configurations.custom_headers; secret_mappings resolve protected values at runtime without storing them in the tool call. Organisation admin keys normally need workspace_id. After creation, create_mcp_server and configure capabilities/access; returns the integration id and slug.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL endpoint of the MCP server to integrate
nameYesDisplay name for the MCP integration
slugNoCustom slug. Auto-generated if omitted
auth_typeYesAuthentication type. Current examples are 'none', 'headers' (custom headers), and 'oauth_auto' (OAuth); Portkey may accept additional values.
transportYesMCP transport protocol: 'http' (streamable HTTP) or 'sse' (server-sent events)
descriptionNoDescription of the MCP integration
workspace_idNoWorkspace ID — required when using organization admin API keys
configurationsNoAdditional documented or forward-compatible configuration fields. For headers auth, configurations.custom_headers is a string-to-string header map.
custom_headersNoCustom headers for authentication (e.g. { "Authorization": "Bearer xxx" }). Sent via configurations.custom_headers
secret_mappingsNoRuntime Secret Reference mappings; every configurations.<field> target must be unique

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesWhether the tool call succeeded and returned structured data
dataNoStructured success payload when ok is true
errorNoStructured error payload when ok is false

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.11.5
    • changedInput schema / properties / auth_type / description
      Previous value: -"Authentication type: 'none', 'headers' (custom headers), or 'oauth_auto' (OAuth)"New value: +"Authentication type. Current examples are 'none', 'headers' (custom headers), and 'oauth_auto' (OAuth); Portkey may accept additional values."
    • removedInput schema / properties / auth_type / enum
      Removed value: -[
      -  "oauth_auto",
      -  "headers",
      -  "none"
      -]
    • addedInput schema / properties / auth_type / minLength
      Added value: +1
    • addedInput schema / properties / configurations
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Additional documented or forward-compatible configuration fields. For headers auth, configurations.custom_headers is a string-to-string header map.",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / secret_mappings
      Added value: +{
      +  "description": "Runtime Secret Reference mappings; every configurations.<field> target must be unique",
      +  "items": {
      +    "properties": {
      +      "secret_key": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Optional key to select from a multi-value secret"
      +      },
      +      "secret_reference_id": {
      +        "description": "Secret Reference UUID or slug accessible to this integration",
      +        "type": "string"
      +      },
      +      "target_field": {
      +        "description": "Configuration field resolved at runtime, such as configurations.oauth_metadata",
      +        "type": "string"
      +      },
      +      "value_format": {
      +        "anyOf": [
      +          {
      +            "enum": [
      +              "string",
      +              "json"
      +            ],
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Use json when the target configuration field expects a structured object"
      +      }
      +    },
      +    "required": [
      +      "target_field",
      +      "secret_reference_id"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  3. Addedv1.0.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already carry the basic safety profile (readOnlyHint=false, destructiveHint=false), so the bar is lower. The description adds real behavioral value: secret_mappings resolve protected values at runtime without storing them in the tool call, the tool does not configure capabilities (that belongs to create_mcp_server), and it returns id and slug. No contradiction with annotations.

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?

Four sentences and roughly 55 words with the purpose front-loaded and each sentence carrying distinct information. The second sentence is dense (semicolon linking the headers-auth choice with runtime secret resolution), and the last sentence mixes next-step routing with the return-value note, making the tail slightly cluttered. Nothing is wasted, but it is not as clean as it could be.

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

Completeness4/5

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

For a complex 10-parameter tool with nested secret_mappings objects and an open-world auth_type, the description covers the main decision points: what it creates, how headers auth works, the org admin key requirement, and the mandatory follow-on tool. The output schema exists, lowering the burden. Gaps remain — the oauth_auto path is not addressed in prose and the boundary with create_integration is only implicit — but the essential call path is fully navigable.

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 description coverage is 100%, so the baseline is 3. The description adds meaning beyond the schema by tying together the parameter interplay: custom_headers is sent via configurations.custom_headers and can be replaced by a secret mapping targeting that same field, secret_mappings resolve at runtime, and workspace_id becomes relevant specifically for org admin keys. It does not walk through every parameter, but the treacherous auth-related ones are covered.

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 — 'Create a Portkey integration for an external MCP server URL' — and the MCP qualifier distinguishes it from the generic create_integration sibling. It also explicitly names create_mcp_server as the separate follow-on tool, so an agent can tell this tool apart from the rest of the MCP family immediately.

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?

Provides conditional guidance for headers auth (custom_headers vs a Secret Reference mapping targeting configurations.custom_headers), flags the workspace_id prerequisite for org admin keys, and routes the agent to create_mcp_server as the required next step. This is clear, actionable context that names a sibling, though it does not explicitly state when-not scenarios such as 'for non-MCP integrations use create_integration'.

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

Deploy Server

Other Tools