Skip to main content
Glama

Prepare Agent Connection

prepare_agent_connection

Create a short-lived, single-use connection setup session for a direct agent endpoint.

    Validates the requested endpoint configuration against the agent's
    platform (see `get_agent_connection` for supported `platform_config`
    fields and `auth_schemes`) and returns a 15-minute `url` and signed
    `ticket` for completing endpoint verification in VAIL. Does not contact
    the agent endpoint or modify the saved connection until that session is
    submitted and passes VAIL's verification check. Do not pass endpoint
    credentials in MCP tool arguments.
    

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": {
      "agent_id": "<agent_id>",
      "connection": "<connection>"
    },
    "name": "prepare_agent_connection"
  }
}

Input Schema

NameRequiredDescriptionDefault
agent_idYesStable agent ID from list_agents or create_agent.
connectionYesDirect endpoint configuration (endpoint_url, auth_scheme, optional auth_header, allow_insecure_http, and platform_config).

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?

Beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=false), the description adds substantial behavioral context: the session is single-use and expires in 15 minutes, it returns a `url` and signed `ticket`, it does not contact the agent endpoint, and it does not modify the saved connection until submission passes verification. It also adds a security rule ('Do not pass endpoint credentials in MCP tool arguments') that is not in the annotations.

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 front-loaded with the core action and lifetime, then adds validation scope, side effects, and the credential rule in order of importance. Every sentence carries information, though the mention of VAIL verification is repeated across two sentences and could be tightened slightly.

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 session-creation tool with a nested connection object and no output schema, the definition covers the returned artifacts (url and ticket with a 15-minute window), the validation scope, and the no-side-effects guarantee until verification passes. The main gap is that it doesn't describe error or validation-failure behavior, but otherwise an agent has enough to call it 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?

Schema description coverage is 100%, so the baseline is 3; the description earns above baseline by explaining that the requested endpoint configuration is validated against the agent's platform and by directing the agent to `get_agent_connection` for valid `platform_config` fields and `auth_schemes`. It also clarifies that credentials belong in the session, not in tool arguments, which affects how parameters are populated. It does not individually document agent_id or connection fields, but the schema already does.

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 states a specific verb and resource: 'Create a short-lived, single-use connection setup session for a direct agent endpoint.' It also implicitly distinguishes this from the sibling get_agent_connection by pointing there for supported config fields, and from prepare_source_upload by scoping to agent endpoints. An agent can tell what this tool does and what it does not do without opening the schema.

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 gives clear context: this is the first step for verifying a direct agent endpoint, and the session must be submitted and pass VAIL verification before the connection is saved. It also points to `get_agent_connection` for the supported platform_config fields and auth_schemes, which is an explicit alternative reference. It stops short of stating when to use a different setup path instead of a direct endpoint, so a 4 rather than a 5.

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.