Skip to main content
Glama

create_mcp_integration

Create a Portkey integration for an external MCP server URL, handling authentication via headers or OAuth, and returning the integration ID and slug for further configuration.

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. Changed2 schema fields changedv0.12.2
    • removedInput schema / properties / secret_mappings / items / properties / secret_key / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / secret_mappings / items / properties / secret_key / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. 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"
      +}
  3. 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"
      +}
  4. Addedv1.0.1

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly=false, destructive=false, non-idempotent, open-world). The description adds real behavioral context beyond them: secret_mappings resolve protected values at runtime without persisting them in the call, the workspace_id requirement for admin keys, and the return payload (integration id and slug). This is genuinely additive.

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?

The purpose is front-loaded in the first sentence, followed by tightly packed auth and follow-up guidance. It is dense and readable with little waste, though the middle clauses run together slightly.

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?

With an output schema present and annotations covering safety, the description need not explain return format, yet it still notes the id/slug return and the post-creation workflow. It is essentially complete for a 10-parameter creation tool, missing only explicit sibling routing.

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, but the description goes further by explaining that custom_headers is delivered via configurations.custom_headers and that secret_mappings target configuration fields resolved at runtime. It clarifies the relationship between parameters the schema documents only in isolation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Create a Portkey integration') and scopes it to an external MCP server URL, which separates it from the generic create_integration sibling. It does not explicitly name or contrast against the closest siblings (create_integration, update_mcp_integration), so it stops short of full differentiation.

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?

It gives clear contextual usage: how to supply headers auth (custom_headers vs secret_mappings), that org admin keys normally need workspace_id, and that create_mcp_server plus capability/access configuration follow. It lacks explicit 'when not to use this' or named-alternative routing.

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