Skip to main content
Glama

Set up agent with grants and hosts

stack_setup_agent

Set an agent up in one step: register it, give it its first grants on connections the account already holds, and declare the hosts those connections' credentials may be sent to. All of it is one human approval whose card lists every part, instead of one approval for each grant and one for each host list. The person confirms it in the chat, and the confirmation lists every part. When human approval is required and the chat client supports MCP elicitation, the person is asked to confirm the exact change in the client; the change is applied only after they approve, and a rejection changes nothing. Otherwise it returns GOVERNANCE_APPROVAL_REQUIRED with approval_id and approval_url, the page for that one approval, and the same payload sent with governance_approval_id after approval applies the change. An approval is single-use, bound to the exact payload, and expires after 24 hours. Use stack_register_agent to register an agent alone and stack_grant_agent_access to change a grant later. The service connections must already exist (stack_list_connected_services). A setup that cannot succeed, for example a scope the connection does not hold or an agent name already in use, is refused before anyone is asked. Returns the agent, the grants made and the host lists set.

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>"
    },
    "name": "stack_setup_agent"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesAgent name (lowercase, letters/digits/hyphens/underscores)
grantsNoThe agent's first grants, one per connection.
on_warningNoAction on warning flags (default: notify)
descriptionNoOptional description
on_criticalNoAction on critical flags (default: notify)
eval_trafficNoMark this agent as test or benchmark traffic (default: false). It is part of the same approval.
allowed_hostsNoThe hosts each named connection's credential may be sent to. A host the connection does not already allow is part of this approval.
credential_accessNoCredential proxy posture (default: proxy_only). Agents never receive raw credentials.
accountability_modeNoAccountability mode (default: logged). 'enforced' holds every call for a person's approval.
governance_approval_idNoApproval id (gvr_*) from the first call, after a person approved it

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

The description goes well beyond the annotations, which only declare non-read-only, non-destructive, closed-world. It discloses the elicitation/approval flow, the GOVERNANCE_APPROVAL_REQUIRED fallback with approval_id and approval_url, single-use payload-bound approvals expiring in 24 hours, and that impossible setups are refused up front. Minor deduction for not stating what a partially-failing host list does, but the mutation and safety profile is unusually well covered.

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 action and its one-approval benefit are front-loaded, and the alternatives and error path follow in logical order. It is longer than needed in the middle, where the single-approval point is restated twice ('one approval whose card lists every part' and 'the confirmation lists every part').

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 governance mutation with no output schema and only three coarse annotations, the description supplies the missing pieces: approval mechanics, the first-call/second-call payload relationship, expiry and single-use semantics, prerequisites, and a statement of what is returned. Nothing essential to correct invocation is absent.

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 baseline is 3; the description still adds meaning by framing grants as the agent's first grants (one per connection), noting that a host not already allowed becomes part of the same approval, and that eval_traffic rides the same approval, plus the rejection rule for scopes the connection does not hold.

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 opening sentence names a specific verb and composite resource: register an agent, grant it first access, and declare allowed hosts in one step. It explicitly distinguishes itself from stack_register_agent and stack_grant_agent_access, so an agent can route correctly without opening a sibling schema.

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?

Guidance is explicit on when to use it (one-step setup under a single approval) and when not to (use stack_register_agent for registration alone, stack_grant_agent_access to change a grant later). It also gives the prerequisite that connections must already exist and points at stack_list_connected_services to verify that.

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.