Skip to main content
Glama

Select Candidate

select_candidate

Select one candidate from a finished compose/consult ensemble as the project's saved composition (whole-candidate replace). Body REQUIRES both fields: { candidateIndex, selectStrategy: "agent-authoritative" } — candidateIndex from wait_job(kind="consult") proposals (mode=amend) or the compose winner report; selectStrategy is required and API keys must use 'agent-authoritative' (editor-merge/editor-replace need an editor-session token and 403 on an API key). agent-authoritative replaces the saved composition unconditionally and ignores ifMatch, so read get_composition first and adopt only when no edit made since the consult or compose must survive. After selecting, render with create_render.

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": {
      "projectId": "<projectId>",
      "composeJobId": "<composeJobId>",
      "body": "<body>"
    },
    "name": "select_candidate"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesPOST /projects/:id/compose/jobs/:jobId/select body.
commandIdNoRetry identity. A call repeated with the same commandId returns the first result instead of acting twice.
projectIdYesprojectId (path).
composeJobIdYescomposeJobId (path).

Output Schema

NameRequiredDescriptionDefault
mergeResultNo
newCompositionEtagNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changed
    • addedInput schema / $defs
      Added value: +{
      +  "__schema0": {
      +    "maximum": 9007199254740991,
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  "__schema1": {
      +    "enum": [
      +      "agent-authoritative",
      +      "editor-merge",
      +      "editor-replace"
      +    ],
      +    "type": "string"
      +  },
      +  "__schema2": {
      +    "type": "string"
      +  },
      +  "__schema3": {
      +    "maxLength": 128,
      +    "minLength": 1,
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / body / properties / candidateIndex / $ref
      Added value: +"#/$defs/__schema0"
    • removedInput schema / properties / body / properties / candidateIndex / maximum
      Removed value: -9007199254740991
    • removedInput schema / properties / body / properties / candidateIndex / minimum
      Removed value: -0
    • removedInput schema / properties / body / properties / candidateIndex / type
      Removed value: -"integer"
    • addedInput schema / properties / body / properties / ifMatch / $ref
      Added value: +"#/$defs/__schema2"
    • removedInput schema / properties / body / properties / ifMatch / type
      Removed value: -"string"
    • addedInput schema / properties / body / properties / selectStrategy / $ref
      Added value: +"#/$defs/__schema1"
    • removedInput schema / properties / body / properties / selectStrategy / enum
      Removed value: -[
      -  "agent-authoritative",
      -  "editor-merge",
      -  "editor-replace"
      -]
    • removedInput schema / properties / body / properties / selectStrategy / type
      Removed value: -"string"
    • addedInput schema / properties / commandId / $ref
      Added value: +"#/$defs/__schema3"
    • removedInput schema / properties / commandId / maxLength
      Removed value: -128
    • removedInput schema / properties / commandId / minLength
      Removed value: -1
    • removedInput schema / properties / commandId / type
      Removed value: -"string"
  2. Changed1 schema field changed
    • addedInput schema / properties / commandId
      Added value: +{
      +  "description": "Retry identity. A call repeated with the same commandId returns the first result instead of acting twice.",
      +  "maxLength": 128,
      +  "minLength": 1,
      +  "type": "string"
      +}
  3. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: agent-authoritative replaces the saved composition unconditionally, ignores ifMatch, and editor strategies require an editor-session token or 403 on an API key. That is exactly the overwrite/auth behavior an agent cannot infer from readOnlyHint=false / destructiveHint=false.

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 operation and effect, then prerequisites, then the follow-up render call; nearly every clause carries information. Slightly dense with stacked parentheticals and em-dashes, and it partially restates the schema's required-field list.

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 4-param mutation with an output schema, it covers everything an agent needs: source of inputs, required strategy, auth constraint, precondition (read get_composition first), overwrite semantics, and the next step (create_render). No gaps remain.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% (baseline 3), but the description goes well beyond it: it explains candidateIndex's origin, that selectStrategy is required and which enum value API keys must use, and why ifMatch is inert under agent-authoritative. That makes a previously opaque field (ifMatch) meaningfully interpretable.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource (select one candidate) and the effect (becomes the project's saved composition, via whole-candidate replace). The scope word 'whole-candidate replace' plus the compose/consult source makes it distinguishable from apply_composition/editorial_apply, though those siblings are never named.

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?

Explicitly says where candidateIndex comes from (wait_job(kind="consult") amend proposals or the compose winner report) and gives a clear when-not rule: adopt only if no edit made since the consult/compose must survive. It also names the alternative strategies (editor-merge/editor-replace) and the condition that rules them out for API-key callers.

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.