Skip to main content
Glama

integrations_add_endpoints

Add one or more API endpoints to an HTTP-API integration as callable tools, merged additively into the integration for base_url (created if none exists). Each endpoint becomes a tool with params + request/response schemas inferred from the samples you pass; give an endpoint a description (what the agent reads) and a request_schema (exact JSON body schema) to set them yourself. When CREATING a new integration, provide auth: either identity (saved Browser Identity name/id) for cookie-session APIs, OR an auth block for token/header APIs, e.g. {type:'bearer', token:'...'} or {type:'api_key', token:'...', header_name:'X-API-Key'}. Updates keep the existing auth unless a new auth is passed. Returns the new tool count and names. Refresh the tools list afterwards to use them.

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": {
      "base_url": "<base_url>",
      "endpoints": "<endpoints>"
    },
    "name": "integrations_add_endpoints"
  }
}

Input Schema

NameRequiredDescriptionDefault
authNoAuth block for a NEW token/header integration (or to change auth on update): {type: none|bearer|api_key|basic|custom_headers, ...}. bearer/basic → {token}; api_key → {token, header_name?}; custom_headers → {headers:{name:value,...}}. Token values are encrypted. Omit for browser_identity (use `identity`) or to keep existing auth.
nameNoDisplay name. OMIT to keep an existing integration's name, or to name a NEW one after its host.
extractNoExplicit browser_identity auth extract for a NEW integration when auto-detect can't find one. One block, e.g. {kind:'cookie', name:'_session', value_format:'raw', header_name:'Cookie', header_template:'{{name}}={{value}}'} — or a LIST of blocks, merged, which is what a session-cookie API needs: the session in Cookie AND a CSRF header echoing one cookie back: {kind:'composite', blocks:[{kind:'cookies', origin:'https://app.example.com'}, {kind:'cookie', name:'xsrf_token', header_name:'x-xsrf-token'}]}; add value_format:'urlencoded' when the site keeps that cookie percent-encoded (Laravel's XSRF-TOKEN; a 419 means this). kind 'cookies' sends every live cookie for that origin (the only way to send an HttpOnly session cookie); its origin must cover the integration's base_url host. Updates reuse existing auth, so omit then.
base_urlYesAPI base URL of the integration, e.g. https://api.boomnow.com. For an existing integration it must stay on that integration's scheme, host and port (another path is fine); an admin moves an integration to a new address in its settings.
identityNoSaved Browser Identity name or numeric id — one way to auth a NEW cookie-session integration (updates reuse existing auth). For token/header APIs use `auth` instead.
endpointsYesEndpoints to add. Each: {method, path, query?(object), request_body?(object sample), response_body?(object/array sample), description?(string), request_schema?(JSON Schema)}. path is relative to base_url, e.g. /api/conversations/all. description (max 780 chars, plain text; control and zero-width characters are removed) is the tool description the agent reads: say what the endpoint does and when to call it. request_schema is the JSON Schema of the JSON request body and replaces the schema inferred from request_body, which keeps only one level of nesting. It must be type: object; nested objects/arrays are kept up to 10 levels; `required` is a list of names on the object; `items` is one schema; no $ref and no oneOf/anyOf/allOf/not at any level; max 16 KB. Adding an endpoint again without description/request_schema keeps the ones it has (a new request_body sample does not replace a request_schema); send a new description or request_schema to change them.
const_fieldsNoRequest-body fields that NEVER vary, as dotted paths into the sample body — e.g. ['query', 'operationName'] for a GraphQL endpoint, or ['envelope.version']. Their value is taken from the sample, pinned server-side, and HIDDEN from the model: it can neither see nor mistype them, and only the parts that actually change (variables, ids, dates) stay in the tool's arguments. Use for GraphQL documents, SOAP envelopes, API versions and tenant ids.
in_workspaceNoRun this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.
integration_idNoUpdate THIS integration (from integrations.list). Without it the integration is found by base_url, and by `identity` when a host has several accounts.
keepalive_operationNooperationId the session keep-alive should ping to hold a cookie session open, e.g. 'getHomeWidgetAlerts'. Must be a param-less GET on this integration. Set it when the API has no obvious session probe in its names (the sweeper looks for validate/session/me/whoami/health) AND its session idles out in hours: without it such an integration only gets the hourly origin warm and dies overnight. Carried over on later updates; OMIT to leave it unchanged.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / base_url / description
      Previous value: -"API base URL of the integration, e.g. https://api.boomnow.com"New value: +"API base URL of the integration, e.g. https://api.boomnow.com. For an existing integration it must stay on that integration's scheme, host and port (another path is fine); an admin moves an integration to a new address in its settings."
    • changedInput schema / properties / endpoints / description
      Previous value: -"Endpoints to add. Each: {method, path, query?(object), request_body?(object sample), response_body?(object/array sample)}. path is relative to base_url, e.g. /api/conversations/all."New value: +"Endpoints to add. Each: {method, path, query?(object), request_body?(object sample), response_body?(object/array sample), description?(string), request_schema?(JSON Schema)}. path is relative to base_url, e.g. /api/conversations/all. description (max 780 chars, plain text; control and zero-width characters are removed) is the tool description the agent reads: say what the endpoint does and when to call it. request_schema is the JSON Schema of the JSON request body and replaces the schema inferred from request_body, which keeps only one level of nesting. It must be type: object; nested objects/arrays are kept up to 10 levels; `required` is a list of names on the object; `items` is one schema; no $ref and no oneOf/anyOf/allOf/not at any level; max 16 KB. Adding an endpoint again without description/request_schema keeps the ones it has (a new request_body sample does not replace a request_schema); send a new description or request_schema to change them."
  2. Changed1 schema field changed
    • addedInput schema / properties / integration_id
      Added value: +{
      +  "description": "Update THIS integration (from integrations.list). Without it the integration is found by base_url, and by `identity` when a host has several accounts.",
      +  "type": "integer"
      +}
  3. Changed1 schema field changed
    • changedInput schema / properties / extract / description
      Previous value: -"Explicit browser_identity auth extract for a NEW integration when auto-detect can't find one. One block, e.g. {kind:'cookie', name:'_session', value_format:'raw', header_name:'Cookie', header_template:'{{name}}={{value}}'} — or a LIST of blocks, merged, which is what a session-cookie API needs: the session in Cookie AND a CSRF header echoing one cookie back: {kind:'composite', blocks:[{kind:'cookies', origin:'https://app.example.com'}, {kind:'cookie', name:'xsrf_token', header_name:'x-xsrf-token'}]}. kind 'cookies' sends every live cookie for that origin (the only way to send an HttpOnly session cookie); its origin must cover the integration's base_url host. Updates reuse existing auth, so omit then."New value: +"Explicit browser_identity auth extract for a NEW integration when auto-detect can't find one. One block, e.g. {kind:'cookie', name:'_session', value_format:'raw', header_name:'Cookie', header_template:'{{name}}={{value}}'} — or a LIST of blocks, merged, which is what a session-cookie API needs: the session in Cookie AND a CSRF header echoing one cookie back: {kind:'composite', blocks:[{kind:'cookies', origin:'https://app.example.com'}, {kind:'cookie', name:'xsrf_token', header_name:'x-xsrf-token'}]}; add value_format:'urlencoded' when the site keeps that cookie percent-encoded (Laravel's XSRF-TOKEN; a 419 means this). kind 'cookies' sends every live cookie for that origin (the only way to send an HttpOnly session cookie); its origin must cover the integration's base_url host. Updates reuse existing auth, so omit then."
  4. Changed1 schema field changed
    • addedInput schema / properties / in_workspace
      Added value: +{
      +  "description": "Run this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.",
      +  "type": "integer"
      +}
  5. Changed1 schema field changed
    • changedInput schema / properties / name / description
      Previous value: -"Display name when creating a new integration. OMIT to default to the host."New value: +"Display name. OMIT to keep an existing integration's name, or to name a NEW one after its host."
  6. Added
  7. Removed
  8. Changed1 schema field changed
    • changedInput schema / properties / name / description
      Previous value: -"Display name when creating a new integration (defaults to the host)."New value: +"Display name when creating a new integration. OMIT to default to the host."
  9. Changed2 schema fields changed
    • addedInput schema / properties / auth
      Added value: +{
      +  "description": "Auth block for a NEW token/header integration (or to change auth on update): {type: none|bearer|api_key|basic|custom_headers, ...}. bearer/basic → {token}; api_key → {token, header_name?}; custom_headers → {headers:{name:value,...}}. Token values are encrypted. Omit for browser_identity (use `identity`) or to keep existing auth.",
      +  "type": "object"
      +}
    • changedInput schema / properties / identity / description
      Previous value: -"Saved Browser Identity name or numeric id — required only when creating a NEW integration (updates reuse existing auth)."New value: +"Saved Browser Identity name or numeric id — one way to auth a NEW cookie-session integration (updates reuse existing auth). For token/header APIs use `auth` instead."
  10. Changed1 schema field changed
    • addedInput schema / properties / extract
      Added value: +{
      +  "description": "Explicit browser_identity auth extract for a NEW integration when auto-detect can't find one, e.g. {kind:'cookie', name:'_session', value_format:'raw', header_name:'Cookie', header_template:'{{name}}={{value}}'}. Updates reuse existing auth, so omit then.",
      +  "type": "object"
      +}
  11. Added

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations (readOnly=false, idempotent=false), it discloses the additive-merge semantics, implicit integration creation, auth carry-over on updates, encryption of token values, server-side pinning that hides const_fields from the model, what re-adding an endpoint preserves, and the returned tool count/names. These are exactly the non-obvious behaviors an agent needs before a mutating call.

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?

Front-loaded with the action and effect, then ordered by concern (tool generation, auth, updates, return value, follow-up). It is dense but appropriately sized for a 10-parameter mutation tool; a few parenthetical asides (e.g. the 419 hint) slightly strain the single-paragraph format.

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 10-parameter, nested-schema mutation tool with no output schema, the description covers what is created, what auth is required in each mode, what is preserved on re-add, what the call returns, and the required follow-up step. Nothing an agent needs to invoke it correctly is missing.

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 schema already carries per-parameter detail and the baseline is 3. The description adds cross-parameter decision value: the identity-vs-auth-vs-extract choice for cookie vs token APIs, and the description/request_schema override of inferred schemas, which is meaning that is not obvious from reading each property 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 opening clause gives a precise verb, resource, and effect: 'Add one or more API endpoints to an HTTP-API integration as callable tools, merged additively... (created if none exists)'. That tells an agent exactly what changes on the server, though no sibling (e.g. integrations_remove_endpoints or integrations_set_auth) is named for contrast.

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 clearly separates the create-new case (must supply `identity` OR an `auth` block) from the update case (existing auth is retained unless a new `auth` is passed), and it tells the caller to refresh the tools list before using them. It falls short of naming alternatives for removing/fixing endpoints or of stating when NOT to use this tool.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.