Skip to main content
Glama

Create model provider config

model_providers_create

Create a model provider configuration with credential validation and a models endpoint probe, returning the provider's model catalog without failing creation if the probe fails.

Instructions

Create a model provider config, validate the configured credential where the provider exposes a validation endpoint, then probe the provider's /models endpoint. The result is returned as model_catalog; a failed probe does not fail creation.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "credential_secret_id": "<credential_secret_id>",
      "name": "<name>",
      "orgID": "<orgID>"
    },
    "name": "model_providers_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesHuman-readable name. Spaces and punctuation are allowed; leading or trailing whitespace and invisible or control characters are not.
orgIDYesOrganization ID (org_...).
presetNoBuilt-in provider settings: openai, openrouter, anthropic, or openlake. A preset fills in api_format, api_variant, base_url, endpoint_path, auth_kind, and auth_options, so omit those when using one.
headersNoExtra HTTP headers sent with every request to this provider. Values are stored and returned as plain text; use secret_headers for keys and tokens.
base_urlNoProvider endpoint base URL.
auth_kindNoHow the credential is sent: as a bearer token, in the header named by auth_options.header_name, or signed with AWS SigV4.
api_formatNoWire protocol the model endpoint speaks.
api_variantNoProvider-specific variant of api_format. Use default unless the endpoint is OpenRouter or Bedrock.
auth_optionsNoNon-secret authentication settings. Use an empty object with bearer_token. With api_key_header, set {"header_name":"..."}; Anthropic Messages defaults to {"header_name":"x-api-key"}. With sigv4, set the AWS signing service and region.
endpoint_pathNoURL path under base_url. Defaults to /responses for OpenAI Responses, /chat/completions for Chat Completions, and /messages for Anthropic Messages.
secret_headersNoExtra HTTP headers whose values come from org-owned generic secrets, mapping header names to secret references.
idle_timeout_msNoMaximum wait for response headers or the next response bytes, in milliseconds. Heartbeats count as activity. Defaults to 300000 (5 minutes). Local response processing does not consume this idle budget.
request_timeout_msNoTotal deadline for one provider attempt, including reasoning and response streaming, in milliseconds. Defaults to 3600000 (60 minutes). Retries have separate deadlines.
credential_secret_idYesSecret ID (sec_...).

Output Schema

NameRequiredDescriptionDefault
configYes
model_catalogYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.11
    • changedInput schema / properties / preset / description
      Previous value: -"Built-in provider settings: openai, openrouter, or anthropic. A preset fills in api_format, api_variant, base_url, endpoint_path, auth_kind, and auth_options, so omit those when using one."New value: +"Built-in provider settings: openai, openrouter, anthropic, or openlake. A preset fills in api_format, api_variant, base_url, endpoint_path, auth_kind, and auth_options, so omit those when using one."
    • changedInput schema / properties / preset / enum
      Previous value: -[
      -  "openai",
      -  "openrouter",
      -  "anthropic"
      -]New value: +[
      +  "openai",
      +  "openrouter",
      +  "anthropic",
      +  "openlake"
      +]
  2. Changed12 schema fields changedv0.1.10
    • changedInput schema / properties / api_format / description
      Previous value: -"Wire protocol the model endpoint speaks: openai-responses, openai-chat-completions, or anthropic-messages."New value: +"Wire protocol the model endpoint speaks."
    • removedInput schema / properties / api_format / x-enum-varnames
      Removed value: -[
      -  "ModelAPIFormatOpenaiResponses",
      -  "ModelAPIFormatOpenaiChatCompletions",
      -  "ModelAPIFormatAnthropicMessages"
      -]
    • changedInput schema / properties / api_variant / description
      Previous value: -"Provider-specific flavor of the API format: default, openrouter, or bedrock."New value: +"Provider-specific variant of api_format. Use default unless the endpoint is OpenRouter or Bedrock."
    • changedInput schema / properties / auth_kind / description
      Previous value: -"How the credential is sent: bearer_token, api_key_header, or sigv4 (AWS)."New value: +"How the credential is sent: as a bearer token, in the header named by auth_options.header_name, or signed with AWS SigV4."
    • removedInput schema / properties / auth_kind / x-enum-varnames
      Removed value: -[
      -  "BearerToken",
      -  "ApiKeyHeader",
      -  "ModelProviderSigV4"
      -]
    • addedInput schema / properties / auth_options / properties / header_name / description
      Added value: +"Header that carries the API key when auth_kind is api_key_header."
    • addedInput schema / properties / auth_options / properties / region / description
      Added value: +"AWS region to sign for when auth_kind is sigv4."
    • addedInput schema / properties / auth_options / properties / service / description
      Added value: +"AWS service to sign for when auth_kind is sigv4."
    • removedInput schema / properties / auth_options / x-go-type
      Removed value: -"json.RawMessage"
    • removedInput schema / properties / auth_options / x-go-type-skip-optional-pointer
      Removed value: -true
    • removedInput schema / properties / name / x-omnara-unicode-normalization
      Removed value: -"NFC"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "DiscoveredModelPricing": {
      +      "description": "Provider-advertised list prices in USD per million tokens, as exact decimal strings. Present only when the provider publishes pricing in its model catalog (OpenRouter). Cache prices are omitted when the provider does not publish them.",
      +      "properties": {
      +        "cache_read_input_usd_per_million": {
      +          "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]+)?$",
      +          "type": "string"
      +        },
      +        "cache_write_input_usd_per_million": {
      +          "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]+)?$",
      +          "type": "string"
      +        },
      +        "input_usd_per_million": {
      +          "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]+)?$",
      +          "type": "string"
      +        },
      +        "output_usd_per_million": {
      +          "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]+)?$",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "input_usd_per_million",
      +        "output_usd_per_million"
      +      ],
      +      "type": "object"
      +    },
      +    "DiscoveredProviderModel": {
      +      "properties": {
      +        "context_window_tokens": {
      +          "description": "Provider-advertised context window limit in tokens, when available.",
      +          "maximum": 2147483647,
      +          "minimum": 2,
      +          "type": "integer"
      +        },
      +        "display_name": {
      +          "type": "string"
      +        },
      +        "max_output_tokens": {
      +          "description": "Provider-advertised maximum output limit in tokens, when available.",
      +          "maximum": 2147483647,
      +          "minimum": 1,
      +          "type": "integer"
      +        },
      +        "pricing": {
      +          "$ref": "#/$defs/DiscoveredModelPricing"
      +        },
      +        "slug": {
      +          "description": "Provider model slug usable as a configured model's provider_model_slug.",
      +          "type": "string"
      +        },
      +        "supported_reasoning_efforts": {
      +          "description": "Reasoning effort values the model accepts, when reported.",
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "supports_reasoning": {
      +          "description": "Whether Omnara can send this model a reasoning effort, when the provider or the public model catalog reports it.",
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "slug"
      +      ],
      +      "type": "object"
      +    },
      +    "ManagementKind": {
      +      "description": "Lifecycle owner. Tenant-managed resources can be changed through tenant APIs. Cluster-managed resources are installed and lifecycle-managed by the control plane; individual APIs may explicitly expose tenant-editable settings.",
      +      "enum": [
      +        "tenant",
      +        "cluster"
      +      ],
      +      "type": "string"
      +    },
      +    "ModelAPIFormat": {
      +      "description": "Wire protocol the model endpoint speaks.",
      +      "enum": [
      +        "openai-responses",
      +        "openai-chat-completions",
      +        "anthropic-messages"
      +      ],
      +      "type": "string"
      +    },
      +    "ModelCatalog": {
      +      "description": "The provider's model catalog, obtained by validating the configured credential and probing the provider's /models endpoint. A failed probe does not affect the stored config; treat it as a warning that the base URL or API key may be invalid.",
      +      "properties": {
      +        "error": {
      +          "description": "Why the probe failed. Present when status is failed.",
      +          "type": "string"
      +        },
      +        "models": {
      +          "description": "Models advertised by the provider, newest first, filtered to text-output tool-calling models where the provider exposes enough metadata to tell. Present when status is ok.",
      +          "items": {
      +            "$ref": "#/$defs/DiscoveredProviderModel"
      +          },
      +          "type": "array"
      +        },
      +        "status": {
      +          "enum": [
      +            "ok",
      +            "failed"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "status"
      +      ],
      +      "type": "object"
      +    },
      +    "ModelProviderAPIVariantResponse": {
      +      "type": "string"
      +    },
      +    "ModelProviderAuthKindResponse": {
      +      "type": "string"
      +    },
      +    "ModelProviderConfig": {
      +      "properties": {
      +        "api_format": {
      +          "$ref": "#/$defs/ModelAPIFormat",
      +          "description": "Wire protocol Omnara speaks to this provider."
      +        },
      +        "api_variant": {
      +          "$ref": "#/$defs/ModelProviderAPIVariantResponse",
      +          "description": "Provider-specific flavor of the API format."
      +        },
      +        "auth_kind": {
      +          "$ref": "#/$defs/ModelProviderAuthKindResponse",
      +          "description": "How Omnara sends the credential to the provider."
      +        },
      +        "auth_options": {
      +          "description": "Non-secret authentication settings for this provider config.",
      +          "properties": {
      +            "header_name": {
      +              "description": "Header that carries the API key when auth_kind is api_key_header.",
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "region": {
      +              "description": "AWS region to sign for when auth_kind is sigv4.",
      +              "maxLength": 64,
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "service": {
      +              "description": "AWS service to sign for when auth_kind is sigv4.",
      +              "maxLength": 64,
      +              "minLength": 1,
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "base_url": {
      +          "description": "Provider endpoint base URL.",
      +          "type": "string"
      +        },
      +        "created_at": {
      +          "$ref": "#/$defs/Timestamp",
      +          "description": "When the provider config was created."
      +        },
      +        "credential_secret_id": {
      +          "$ref": "#/$defs/SecretID",
      +          "description": "Secret holding the credential Omnara sends to the provider."
      +        },
      +        "endpoint_path": {
      +          "description": "Path under base_url that model requests are sent to.",
      +          "type": "string"
      +        },
      +        "headers": {
      +          "additionalProperties": {
      +            "type": "string"
      +          },
      +          "description": "Extra HTTP headers sent with every request to this provider.",
      +          "type": "object"
      +        },
      +        "id": {
      +          "$ref": "#/$defs/ModelProviderConfigID",
      +          "description": "Identifies this provider config."
      +        },
      +        "idle_timeout_ms": {
      +          "description": "Longest wait for response headers or more response data; heartbeats count as activity.",
      +          "type": "integer"
      +        },
      +        "management_kind": {
      +          "$ref": "#/$defs/ManagementKind",
      +          "description": "Whether the organization manages this provider or the Omnara installation provisions and manages it."
      +        },
      +        "name": {
      +          "$ref": "#/$defs/ResourceName",
      +          "description": "Name agent configs use to reference this provider as model.provider_config."
      +        },
      +        "org_id": {
      +          "$ref": "#/$defs/OrganizationID",
      +          "description": "Organization that owns this provider config."
      +        },
      +        "request_timeout_ms": {
      +          "description": "Total deadline for one provider attempt, including reasoning and response streaming.",
      +          "type": "integer"
      +        },
      +        "secret_headers": {
      +          "additionalProperties": {
      +            "$ref": "#/$defs/SecretID"
      +          },
      +          "description": "Extra HTTP headers whose values come from the referenced secrets.",
      +          "type": "object"
      +        },
      +        "updated_at": {
      +          "$ref": "#/$defs/Timestamp",
      +          "description": "When the provider config was last changed."
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "org_id",
      +        "management_kind",
      +        "name",
      +        "api_format",
      +        "api_variant",
      +        "base_url",
      +        "endpoint_path",
      +        "request_timeout_ms",
      +        "idle_timeout_ms",
      +        "auth_kind",
      +        "auth_options",
      +        "credential_secret_id",
      +        "headers",
      +        "secret_headers",
      +        "created_at",
      +        "updated_at"
      +      ],
      +      "type": "object"
      +    },
      +    "ModelProviderConfigID": {
      +      "pattern": "^mpc_[a-z2-7]{26}$",
      +      "type": "string"
      +    },
      +    "OrganizationID": {
      +      "pattern": "^org_[a-z2-7]{26}$",
      +      "type": "string"
      +    },
      +    "ResourceName": {
      +      "description": "Human-readable name. Spaces and punctuation are allowed; leading or trailing whitespace and invisible or control characters are not.",
      +      "maxLength": 64,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "SecretID": {
      +      "description": "Secret ID (sec_...).",
      +      "pattern": "^sec_[a-z2-7]{26}$",
      +      "type": "string"
      +    },
      +    "Timestamp": {
      +      "format": "date-time",
      +      "type": "string"
      +    }
      +  },
      +  "properties": {
      +    "config": {
      +      "$ref": "#/$defs/ModelProviderConfig"
      +    },
      +    "model_catalog": {
      +      "$ref": "#/$defs/ModelCatalog"
      +    }
      +  },
      +  "required": [
      +    "config",
      +    "model_catalog"
      +  ],
      +  "type": "object"
      +}
  3. Changed1 schema field changedv0.1.9
    • changedInput schema / properties / base_url / description
      Previous value: -"Provider endpoint base URL. Normal API mode requires a public HTTPS endpoint; localhost and loopback endpoints are accepted only when the API is running in insecure dev mode."New value: +"Provider endpoint base URL."
  4. Changed7 schema fields changedv0.1.1
    • addedInput schema / $defs / SecretID / description
      Added value: +"Secret ID (sec_...)."
    • addedInput schema / properties / api_format / description
      Added value: +"Wire protocol the model endpoint speaks: openai-responses, openai-chat-completions, or anthropic-messages."
    • addedInput schema / properties / api_variant / description
      Added value: +"Provider-specific flavor of the API format: default, openrouter, or bedrock."
    • addedInput schema / properties / auth_kind / description
      Added value: +"How the credential is sent: bearer_token, api_key_header, or sigv4 (AWS)."
    • addedInput schema / properties / credential_secret_id / description
      Added value: +"Secret ID (sec_...)."
    • addedInput schema / properties / orgID / description
      Added value: +"Organization ID (org_...)."
    • addedInput schema / properties / preset / description
      Added value: +"Built-in provider settings: openai, openrouter, or anthropic. A preset fills in api_format, api_variant, base_url, endpoint_path, auth_kind, and auth_options, so omit those when using one."
  5. First observed

TDQS

A4/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=false), the description discloses meaningful behavior: it performs outbound credential validation and a /models probe, returns the probe output as model_catalog, and explicitly states a failed probe does not fail creation. That failure-tolerance note is exactly the kind of side-effect context annotations cannot convey; it stops short of covering permissions or whether a duplicate name errors.

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?

Two sentences, zero filler, with the primary action front-loaded and the non-obvious failure semantics trailing in a single clause. Nothing is repeated from the schema or annotations.

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 14-parameter, nested-schema mutation tool with an output schema, the description covers the key unknowns: what happens after creation, what gets returned, and how probe failure is treated. The remaining gap is the interaction between preset and explicit fields plus required-secret prerequisites, which the schema documents but the description does not tie together.

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?

Schema description coverage is 100%, so the schema already explains every one of the 14 parameters, including preset precedence and auth_options shapes. The description adds no parameter-level meaning at all — it never mentions credential_secret_id, preset, or the required orgID — so the baseline 3 applies.

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 and resource ("Create a model provider config") and then enumerates the two post-creation steps — credential validation where supported, and a /models probe. This is clearly distinguishable from the sibling update/get/delete/catalog operations on the same resource.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the verb: create a new provider config. However, there is no explicit guidance on prerequisites (a credential secret must already exist), no mention of when to use this versus model_providers_update, and no discussion of the preset-versus-explicit-fields choice that the schema exposes.

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