Skip to main content
Glama

Prepare a subagent package

get_subagent_context
Read-only

Prepare a task-scoped worker context and contract for a fresh subagent, enabling delegation without switching your persona or spawning workers.

Instructions

Prepare a stateless task-scoped worker package without switching your persona.

Unknown arguments are rejected. Total original request limit: 48000 canonical
JSON characters, including unknown fields. Retain the returned
contract and your own persona; forward worker_context to a fresh native worker.
This tool does not spawn workers. The worker uses this role without another
activation or conversation footer/log, and returns exactly the JSON envelope.
Require status: prepared before spawning. For every returned or revised output,
call validate_subagent_result with YOUR retained contract and the unchanged
output. Require valid: true before accepting or integrating it, then assess
evidence/acceptance criteria yourself. Endpoint failure does not authorize an
unprepared worker or unvalidated result. Missing compact sources or an
insufficient mandatory-context budget return an error with no partial package.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYesRequired nonempty assignment; at most 4000 characters.
scopeNoUp to 50 allowed areas/actions, each 1..4000 characters.
contextNoUp to 50 relevant facts/references, each 1..4000 characters; not the whole transcript. References are not opened.
task_idNoOptional caller ID (1..128 letters, digits, underscore, dot, colon, hyphen); generated when omitted.
non_goalsNoUp to 50 excluded tasks, each 1..4000 characters.
agent_nameYesRequired canonical existing persona name; at most 80 characters.
attempt_idNoAttempt ID in the same format as task_id; change for a new attempt.1
max_skillsNoMaximum selected skills, integer 0..5; default 3.
result_typeNoOne of generic, review, implementation, research; fixed built-in result schema.generic
max_implantsNoMaximum full-body implants, integer 0..2; default 0.
artifact_manifestNoOptional exact active task manifest returned by artifact_manifest_create. Pins hashes in the contract and adds automatic artifact_read instructions; contents are not inlined. Requires a valid workspace and the matching task ID.
max_context_charsNoComplete worker-context character budget, integer 2000..64000; default 16000.
acceptance_criteriaYesRequired 1..50 nonempty completion criteria, each at most 4000 characters; use a JSON array, not text.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv26.10.16
    • addedInput schema / properties / artifact_manifest
      Added value: +{
      +  "default": null,
      +  "description": "Optional exact active task manifest returned by artifact_manifest_create. Pins hashes in the contract and adds automatic artifact_read instructions; contents are not inlined. Requires a valid workspace and the matching task ID.",
      +  "title": "Artifact Manifest",
      +  "type": "object"
      +}
    • addedOutput schema / $defs / ArtifactDescriptor
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "artifact_id": {
      +      "pattern": "^art_[a-f0-9]{64}$",
      +      "title": "Artifact Id",
      +      "type": "string"
      +    },
      +    "media_type": {
      +      "enum": [
      +        "text/plain",
      +        "text/markdown",
      +        "application/json"
      +      ],
      +      "title": "Media Type",
      +      "type": "string"
      +    },
      +    "name": {
      +      "maxLength": 120,
      +      "minLength": 1,
      +      "title": "Name",
      +      "type": "string"
      +    },
      +    "sha256": {
      +      "pattern": "^[a-f0-9]{64}$",
      +      "title": "Sha256",
      +      "type": "string"
      +    },
      +    "size_bytes": {
      +      "maximum": 4194304,
      +      "minimum": 0,
      +      "title": "Size Bytes",
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "artifact_id",
      +    "sha256",
      +    "size_bytes",
      +    "media_type",
      +    "name"
      +  ],
      +  "title": "ArtifactDescriptor",
      +  "type": "object"
      +}
    • addedOutput schema / $defs / ArtifactManifest
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "created_at": {
      +      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|\\+00:00)$",
      +      "title": "Created At",
      +      "type": "string"
      +    },
      +    "entries": {
      +      "items": {
      +        "$ref": "#/$defs/ArtifactManifestEntry"
      +      },
      +      "maxItems": 32,
      +      "minItems": 1,
      +      "title": "Entries",
      +      "type": "array"
      +    },
      +    "expires_at": {
      +      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?(?:Z|\\+00:00)$",
      +      "title": "Expires At",
      +      "type": "string"
      +    },
      +    "manifest_id": {
      +      "pattern": "^manifest_[a-f0-9]{32}$",
      +      "title": "Manifest Id",
      +      "type": "string"
      +    },
      +    "schema": {
      +      "const": "agents-core/artifact-manifest/1",
      +      "title": "Schema",
      +      "type": "string"
      +    },
      +    "sha256": {
      +      "pattern": "^[a-f0-9]{64}$",
      +      "title": "Sha256",
      +      "type": "string"
      +    },
      +    "task_id": {
      +      "maxLength": 128,
      +      "minLength": 1,
      +      "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$",
      +      "title": "Task Id",
      +      "type": "string"
      +    },
      +    "workspace_sha256": {
      +      "pattern": "^[a-f0-9]{64}$",
      +      "title": "Workspace Sha256",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "schema",
      +    "manifest_id",
      +    "workspace_sha256",
      +    "task_id",
      +    "created_at",
      +    "expires_at",
      +    "entries",
      +    "sha256"
      +  ],
      +  "title": "ArtifactManifest",
      +  "type": "object"
      +}
    • addedOutput schema / $defs / ArtifactManifestEntry
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "artifact": {
      +      "$ref": "#/$defs/ArtifactDescriptor"
      +    },
      +    "purpose": {
      +      "maxLength": 1000,
      +      "minLength": 1,
      +      "title": "Purpose",
      +      "type": "string"
      +    },
      +    "required": {
      +      "title": "Required",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "artifact",
      +    "required",
      +    "purpose"
      +  ],
      +  "title": "ArtifactManifestEntry",
      +  "type": "object"
      +}
    • addedOutput schema / $defs / TaskContract / properties / artifact_manifest
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/ArtifactManifest"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
  2. First observedv26.10.14+1807

TDQS

A4/5.0
Behavior4/5

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

readOnlyHint=true already establishes the safe-read profile, so the bar is lower; the description still adds substantial non-obvious behavior: unknown arguments are rejected, a 48000-character total request cap, endpoint failure does not authorize bypass, and insufficient context returns an error with no partial package. It does not describe rate limits or idempotency across attempt_id values, so it is strong but not exhaustive.

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 purpose and the no-spawn negation, then the constraints and the required follow-up call. Dense but every sentence carries an operative rule. It is slightly long and some clauses are run-on, which keeps it out of the top band.

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 13-parameter tool with nested objects and a declared output schema, the description covers the workflow, error semantics, and budget limits, and correctly leaves return-envelope details to the output schema. It leaves the meaning of retained 'contract' and the interplay of attempt_id/artifact_manifest lightly specified, but nothing critical to a correct call is missing.

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 adds a constraint the schema does not carry: a 48000 canonical-JSON-character total including unknown fields, which bounds the combined task/context/scope payload beyond the per-field max_context_chars budget. It does not otherwise explain individual parameters, so it sits just above baseline.

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 concrete action and artifact: 'Prepare a stateless task-scoped worker package without switching your persona,' and explicitly negates a tempting misreading with 'This tool does not spawn workers.' However, it uses internal jargon ('worker package', 'persona', 'implants') and never names the nearest sibling (get_agent_context) to disambiguate, so an agent must infer the boundary.

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 an explicit ordering constraint: 'Require status: prepared before spawning' and 'call validate_subagent_result with YOUR retained contract and the unchanged output. Require valid: true.' That is real when-to-use guidance. It stops short of naming alternatives or stating when this tool is the wrong choice versus get_agent_context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.