Skip to main content
Glama

start_agent_session

Idempotent

Start or retry a project-scoped agent session and record its goal. Returns record.id to pass as sessionId on later calls; finish with finish_agent_session. Does not run an agent or change repository files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesOwned project ID returned by list_linked_projects or map_project; do not use a local path or repository URL.
sessionIdNoOwned project ID returned by list_linked_projects or map_project; do not use a local path or repository URL.
requestTextYes
idempotencyKeyYesCaller-generated retry key. Reuse the same key and identical payload only to retry the same mutation; use a new key for a new action.
expectedVersionNoCurrent version of the target record from its latest read or mutation result. A stale value causes a version conflict; re-read before retrying.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / expectedVersion / description
      Added value: +"Current version of the target record from its latest read or mutation result. A stale value causes a version conflict; re-read before retrying."
    • addedInput schema / properties / idempotencyKey / description
      Added value: +"Caller-generated retry key. Reuse the same key and identical payload only to retry the same mutation; use a new key for a new action."
    • addedInput schema / properties / projectId / description
      Added value: +"Owned project ID returned by list_linked_projects or map_project; do not use a local path or repository URL."
    • addedInput schema / properties / sessionId / description
      Added value: +"Owned project ID returned by list_linked_projects or map_project; do not use a local path or repository URL."
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already flag it as a non-read-only, idempotent, non-destructive mutation, and the description reinforces the retry semantics rather than repeating them. Its real added value is the negative scope — no agent execution and no repository file changes — which prevents an agent from misreading 'agent session' as running work, plus the return-value contract (record.id) not present in annotations.

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?

Two sentences, zero filler, front-loaded with the action and ending with the two facts an agent needs next (what it returns, how to finish). Nothing could be removed without losing information.

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?

With no output schema, the description correctly supplies the key return value (record.id) and the terminal counterpart tool. It is nearly complete for a 5-param mutation; only the version-conflict behavior of expectedVersion is left entirely to the schema.

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 80%, so the baseline is 3. The description adds useful meaning by tying the return value to the sessionId parameter ('pass as sessionId on later calls'), partially compensating for the sessionId property whose schema description is a copy-paste of projectId's text.

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 resource ('Start or retry a project-scoped agent session and record its goal'), covering the create and retry cases. It names the paired lifecycle tool (finish_agent_session) and draws a hard boundary ('Does not run an agent or change repository files'), which is essential disambiguation given siblings like begin_agent_execution and route_agent_task.

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 and sequencing: it returns record.id to pass as sessionId on later calls, and the session is closed with finish_agent_session. It also carves out what it is not for (running an agent, changing files). It stops short of naming an explicit alternative for the retry-with-stale-version case, though the idempotencyKey/expectedVersion schema covers that mechanically.

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