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

TableJSON Schema
NameRequiredDescriptionDefault
installNoA multi-door connector's door (microsoft: 'organization' or 'azure'); omit for the ordinary sign-in.
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. 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)."
  2. Changed1 schema field changed
    • addedInput schema / properties / environment / enum
      Added value: +[
      +  "prod",
      +  "staging",
      +  "dev"
      +]
  3. Added

TDQS

A4.8/5.0
Behavior5/5

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

The description discloses that the link is single-use with a 10-minute expiry, that credentials land in the company vault via provider callback (not via conversation), and that a 409 error occurs if the service already has live connections. It also notes the human must be signed in to the provider. These details go beyond the annotations, which only indicate destructive and open-world hints, and do not contradict them.

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 description is long but information-dense, front-loading the core purpose and then systematically addressing parameter usage, error handling, and human requirements. It is well-structured with clear conditionals, though it could be slightly more concise without losing critical details.

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 complex OAuth tool with 7 parameters and no output schema, the description is remarkably complete: it covers the primary use case, the reconnect/re-consent flow, the 409 error response, the return fields (url, expiresAt), and the requirement for human sign-in. An agent has everything needed to invoke the tool correctly.

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?

The description adds significant context to the parameters: it explains the role of reconnectId vs instanceName (with precedence), the newConnection flag's purpose, and the install/directory specifics for Microsoft. While the schema already describes each parameter, the description clarifies the semantic relationships and error scenarios, enhancing the agent's understanding.

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 explicitly states the tool 'Mint the provider's authorize URL for an OAuth connector' and explains the purpose: enabling a human to connect or reconnect via a one-click link. It clearly differentiates from sibling tools by focusing on OAuth link generation, which is unique in the sibling list.

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?

The description provides explicit conditions: when to pass reconnectId or instanceName for re-consent, when to pass newConnection:true to add another account, and what happens when neither is passed (409 with a list). It also clarifies the precedence between reconnectId and instanceName, giving clear guidance for parameter selection.

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