Skip to main content
Glama

Connect a service: mint a one-click OAuth link for the human to open

connections_connect_oauth_link
Destructive

Mint the provider's authorize URL for an OAuth connector (google_cloud, microsoft, cloudflare, discord, github, …) so the human can connect - or RECONNECT to grow a grant's scopes - by opening ONE link, with no Studio sign-in. Returns {url, expiresAt}; the link's state is single-use and lives 10 minutes, and the credential lands in this company's vault through the provider callback, never through the conversation. Pass reconnectId (a /v1/connected-services row id) or instanceName (an existing instance's name) to RE-CONSENT that exact row - a scope added to a connector never widens an existing grant, so this is how an operator re-consents after a scope list changes. When the service already has live connections and you pass neither, the call returns 409 target_required listing them (instanceName, reconnectId, accountName); pass newConnection: true only to add another account. The reply's landsOn names the row the grant will land on. The human must be signed in to the PROVIDER in the browser that opens the link; that sign-in is the provider's, not ours.

Input Schema

NameRequiredDescriptionDefault
personNoLinked person to run this call as (first name). Omit to run as the connection's holder.
installNoA multi-door connector's door (microsoft: 'organization' or 'azure'); omit for the ordinary sign-in.
projectNoWorkspace to run this call in (id or name).
serviceYesOAuth connector slug (e.g. google_cloud, microsoft, cloudflare).
directoryNoMicrosoft only: a tenant to authorize against for a guest account.
environmentNoprod (default) | staging | dev, where the caller's key allows it.
reconnectIdNoConnected-services row id to re-consent in place (wins over instanceName).
instanceNameNoAn existing instance to re-consent (becomes its reconnectId), or the name for a new connection.
newConnectionNoAdd a NEW connection even though the service already has live ones (a second account).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / person
      Added value: +{
      +  "description": "Linked person to run this call as (first name). Omit to run as the connection's holder.",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / project
      Added value: +{
      +  "description": "Workspace to run this call in (id or name).",
      +  "type": "string"
      +}
  3. Changed3 schema fields changed
    • changedInput schema / properties / instanceName / description
      Previous value: -"Instance label the credential lands on (default 'default')."New value: +"An existing instance to re-consent (becomes its reconnectId), or the name for a new connection."
    • addedInput schema / properties / newConnection
      Added value: +{
      +  "description": "Add a NEW connection even though the service already has live ones (a second account).",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / reconnectId / description
      Previous value: -"Connected-services row id to repair in place (wins over instanceName)."New value: +"Connected-services row id to re-consent in place (wins over instanceName)."
  4. Changed1 schema field changed
    • addedInput schema / properties / environment / enum
      Added value: +[
      +  "prod",
      +  "staging",
      +  "dev"
      +]
  5. Added

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already flag this as non-readOnly, destructive and open-world, so the safety profile is pre-declared. The description goes beyond that with concrete behavior: single-use state, 10-minute expiry, credential lands in the company vault via provider callback rather than the conversation, a 409 target_required path, and a landsOn field in the reply. That is substantive added context.

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 core action and return shape before the edge-case routing rules, so the important part lands first. It is dense and em-dash-packed, and a clause or two (e.g. the provider sign-in caveat) could be trimmed, but nearly every sentence carries operational information.

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 9-parameter mutation with no output schema, the description supplies the return shape ({url, expiresAt}), the lifetime and single-use constraint, the 409 failure mode, and who must be authenticated (the human, at the provider, not here). Nothing an agent needs to call this 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 baseline is 3, but the description adds real semantics on top: the precedence and purpose of reconnectId vs instanceName, the exact condition that justifies newConnection, and the error payload shape listing instanceName, reconnectId and accountName. Minor parameters (person, install, directory, environment) are left to the schema, which already documents them.

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 artifact: 'Mint the provider's authorize URL for an OAuth connector,' and names concrete services (google_cloud, microsoft, cloudflare, discord, github). This is clearly distinguishable from siblings like connections_apps or connections_explore_connectors, which inspect rather than mint links.

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

Usage Guidelines5/5

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

Gives explicit routing rules: pass reconnectId or instanceName to re-consent an exact row, pass newConnection:true only to add another account, and expect a 409 target_required when live connections exist and neither is supplied. It also explains why re-consent is needed (a scope added to a connector never widens an existing grant), which is genuine when-and-why guidance.

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