Coder Agents completes work by calling tools: structured functions the agent invokes during a chat to gather context and take action, such as listing templates, reading files, running commands, or creating a workspace.
The agent cannot list templates or create workspaces that you could not access yourself.
- **Results carry instructions.**
Where a decision matters, the tool result includes a `next_step` field containing a fixed instruction for the agent, such as asking you to choose between similar templates.
This keeps agent behavior consistent without relying on long prompt rules.
If missing tools, skills, Model Context Protocol (MCP) integrations, or context block progress, or the task needs workspace file access or execution, the agent provisions a workspace.
Administrators can restrict which templates these tools can use with the switches on the [Templates page](./platform-controls/template-optimization.md#restrict-available-templates).
`list_templates` returns a ranked shortlist of the active, non-deprecated templates in the chat's organization, so the agent can pick a template the same way a colleague would: prefer what matches the request, what you already use, and what the rest of the organization uses.
Templates are ordered by query relevance first (when a query is provided), then by an affinity score computed from your recent usage and organization popularity.
Name and ID break any remaining ties so the order is stable.
Personal usage carries ten times the weight of organization popularity, and popularity grows logarithmically so heavily used templates do not drown out your own history.
The score is internal and only determines ordering and the recommendation.
The response carries the raw evidence instead: `active_developers`, `your_workspace_count`, and `last_used_by_you` appear on each template when they are non-zero.
-`recommended_template_id` is present only when the top template is a clear winner: it is the only available template, it matches the query at a strictly higher tier than every other match, or its affinity score reaches at least the score of two active developers and leads the runner-up by a clear margin.
The agent follows `next_step` and calls `create_workspace` with the recommended template.
Had the two templates tied (for example, both plain substring matches with similar usage), the response would omit `recommended_template_id` and `next_step` would instruct the agent to ask you to choose.
`read_template` reads one template's details: its configurable parameters (name, type, default, options, and validation rules) and its presets, including preset parameter values and whether prebuilt workspaces are available for faster startup.
- The agent creates a workspace when missing tools, skills, MCP integrations, or context block progress, when workspace access is needed, or when you ask.
It prefers existing tools and context when they're sufficient.
Creating a workspace doesn't make workspace MCP tools available in Plan Mode.
Workspace readiness doesn't guarantee that skills, MCP tools, or context have finished loading.
The agent uses available capabilities rather than recreating the workspace to retry discovery.
It follows the `next_step` from `list_templates`, asking you to choose when no template is recommended.