Skip to main content
Glama

Upsert integration

upsert_integration
Idempotent

Store OAuth credentials for one organization-wide integration, keyed by name: creates the record, or overwrites the access token, refresh token and expiry of an existing one, so repeat calls never duplicate. Saving marks the integration connected and clears its failure count, which revives one that needed reconnecting. Admin only (403 for members). Returns { name, expiresAt, updatedAt }; tokens are not echoed. Use get_integration to check what is stored.

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": {
      "name": "<name>",
      "accessToken": "<accessToken>",
      "refreshToken": "<refreshToken>"
    },
    "name": "upsert_integration"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesIntegration key, unique per organization, e.g. "eloovor". An existing record with this name is overwritten.
expiresAtNoWhen the access token expires, as an ISO 8601 date string. Omitting it clears any stored expiry.
accessTokenYesOAuth access token issued by the third-party service; replaces any stored one.
refreshTokenYesOAuth refresh token issued by the third-party service; replaces any stored one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses the admin-only restriction with the concrete failure mode (403 for members), the side effects of saving (marks connected, clears failure count, revives a reconnect-needed record), and the response shape { name, expiresAt, updatedAt } with tokens deliberately not echoed. Nothing here conflicts with readOnlyHint=false, idempotentHint=true or destructiveHint=false; overwriting tokens without deleting the record is consistent with non-destructive idempotent upsert.

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?

Front-loaded with the verb and resource, then side effects, then access constraints, then return value, then the sibling pointer. Every clause carries load — no filler, no repetition of the title.

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 mutation tool with no output schema, the description covers return shape, authorization requirements, side effects on existing state, and where to go for reads. An agent has everything needed to call it correctly and predict consequences.

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 coverage is 100%, so all four parameters including expiry-clearing behavior are already documented in the schema. The description adds the organization-wide scoping of the key and reinforces overwrite semantics, but contributes no syntax or format detail the schema lacks. Baseline 3 is appropriate.

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 operation and resource: 'Store OAuth credentials for one organization-wide integration, keyed by name', and immediately clarifies the create-or-overwrite semantics. The closing pointer to get_integration makes the boundary with the read sibling explicit.

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?

Gives clear context for calling it (repeat calls never duplicate, saving revives an integration needing reconnection) and routes reads to get_integration. It stops short of stating explicit exclusions, e.g. that this only stores tokens and cannot update other integration fields, but the operational guidance is strong.

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.

Resources