Skip to main content
Glama

Generate agent instructions with an AI Builder prompt

cs_generate_instructions

Generates an agent's system prompt from a brief covering purpose, audience, tone, and boundaries, then optionally writes it into the agent's instruction file.

Instructions

Write the agent's instructions for it - the system prompt that decides how it answers. Builds a brief from purpose, audience, tone, capabilities, boundaries and examples, send it to an AI Builder prompt or model (pac copilot model predict; pick one with cs_list_prompts), and return the generated instructions. With apply: true the text is written into the agent's instructions (agent.mcs.yml, or settings.mcs.yml for cli-copilot). Pass currentInstructions/changeRequest (or refine: true to read the workspace) to revise existing instructions instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toneNo
applyNoWrite the result into the agent instructions
refineNoRevise the workspace's current instructions using changeRequest
modelIdNo
purposeNoWhat the agent is for; required unless refining
audienceNo
examplesNo
languageNo
inputModeNo
modelNameNoFull or partial AI Builder model / prompt name
workspaceNoPath to (or inside) the agent workspace. Defaults to CPS_WORKSPACE or the current directory.
boundariesNo
environmentNoEnvironment id or URL. Defaults to the active pac auth profile.
capabilitiesNoDefault: derived from the workspace (topics, knowledge, tools)
changeRequestNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.5

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the disclosure burden and largely does so: it states that apply:true performs a filesystem write into agent.mcs.yml/settings.mcs.yml, that environment defaults to the active pac auth profile, and that capabilities default to workspace-derived values. It does not describe failure modes, overwrite risk to existing instructions, or model-call cost/latency.

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?

Three sentences, front-loaded with the core action and followed by mechanism and the refine/apply variants. It is dense but every clause carries information; the nesting of parentheticals and defaults makes it slightly hard to scan.

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 15-parameter mutation tool with no output schema and no annotations, the description covers the write semantics, the model-selection prerequisite, and the two operating modes (generate vs refine) well. It stops short of covering the optional content-shaping params (tone, audience, examples, language) and any success/return expectations.

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 only 47% across 15 params, so the description must compensate, and it does for the highest-stakes keys: apply, refine, purpose (required unless refining), changeRequest/currentInstructions, capabilities default, workspace default, and modelId via cs_list_prompts. tone, audience, examples, language, and inputMode remain unexplained in both places, keeping it below 5.

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 names a specific verb and artifact: writing the agent's instructions (system prompt) that decide how it answers. It also identifies the mechanism (AI Builder prompt / pac copilot model predict) and the output file (agent.mcs.yml or settings.mcs.yml), which separates it clearly from generic siblings like cs_update_agent or cs_review_agent.

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 concrete conditional usage: apply:true writes to the workspace, refine:true reads and revises existing instructions via changeRequest, and cs_list_prompts is the way to pick a model. It lacks an explicit when-not-to-use or a direct comparison against cs_update_agent, so it falls just short of 5.

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

Deploy Server

Other Tools