> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oasm.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Tools

> How agent tools are declared, which tools exist in each mode, the permission each one requires, how results are kept small, and how external MCP tools join the set

Tools are the agent's only way to read or change anything. Every tool is a typed function in the core API; the model sees its name, description and input schema, and the runtime decides — per run and per call — whether it may run.

## How a tool is declared

Each tool is a method on a service class, marked with a decorator that declares everything the runtime needs to know about it:

| Property | Meaning |
| - | - |
| `name`, `description`, `inputSchema` | What the model sees. The input is a Zod schema, validated before the method runs. Description and schema can be computed per run — for example, listing the connectors installed in this workspace. |
| `permissions` | The workspace permission keys the member must hold, checked at call time. `[]` means membership only. |
| `readOnly` | The tool only reads. Read-only tools never ask for approval. |
| `modes` | `ask`, `agent` or both. A tool outside the run's mode is not offered at all. |
| `mcp` | Also exposed on the OASM MCP server. Only read-only tools with a static schema may be. |
| `gate` | How approval applies: the default approval gate, the tool gates itself on its raw input, or no gate. |

The core API checks every declaration when it starts: a duplicate name, an MCP tool that is not read-only, or a malformed schema stops the boot. A test pins the full list, the order the model sees the tools in, each tool's permission keys and the MCP surface, so a change to any of them is deliberate.

Renamed tools keep their old names as aliases, so saved settings and custom agent definitions that refer to them keep working.

## The built-in tools

### Read the workspace

| Tool | Permission | Purpose |
| - | - | - |
| `describe_attack_surface`, `query_attack_surface` | membership; the query engine checks `asset.read`, `vulnerability.read`, `target.read` per resource | The only way to read targets, hosts, services, technologies, TLS, URLs, IPs, DNS and findings. See [ASQ for the agent](https://docs.oasm.io/attack-surface-query/ai-agent-and-mcp.md). |
| `investigate_vulnerability` | `vulnerability.read` | One finding with its evidence and history |
| `gather_statistics` | `workspace.read` | Dashboard numbers |
| `enumerate_open_issues`, `inspect_issue` | `workspace.read` | Remediation issues |
| `display_available_tools`, `list_tool_config_profiles` | `workspace.read` | Installed tools and connectors, their config fields and profiles — field names only, never secret values |
| `list_active_workers` | `worker.read` | Workers the agent can use |
| `review_jobs` | `job.read` | Jobs and runs |
| `list_projects`, `inspect_project`, `list_project_assets`, `list_project_runs`, `read_project_file` | `project.read` | Projects |
| `list_workflow_templates`, `list_pipeline_tools`, `inspect_pipeline_tool` | `project.read` / `workspace.read` | Inputs for building project pipelines |
| `retrieve_web_page` | membership | Fetch one public page |

### Act (Agent mode)

| Tool | Permission | Purpose |
| - | - | - |
| `create_project`, `update_project_scope`, `update_project_instruction`, `add_project_workflow`, `remove_project_workflow`, `add_project_trigger`, `remove_project_trigger`, `add_assets_to_project`, `remove_assets_from_project`, `run_project_workflow` | `project.write` | Build and run [project](https://docs.oasm.io/project.md) pipelines |
| `add_targets` | `target.write` | Add scope |
| `install_tool` | `workspace.write` | Install a connector in the workspace |
| `run_tool_connector` | `job.write` | Run one connector against one target on a worker |
| `execute_remote_command` | `worker.write` | Run a shell command in the worker sandbox |
| `read_tool_output` | membership | Page through stored output of the two tools above |
| `propose_vulnerability` | `vulnerability.write` | Propose a finding, with evidence, for human review |

### Runtime tools

These manage the run itself rather than workspace data, and need no permission beyond chatting:

* **Plan** — `formulate_plan`, `transition_step`, `append_step`, `scrap_plan`. See [Plans and subagents](https://docs.oasm.io/architecture/ai-agent/plans-and-subagents.md).
* **Subagents** — `dispatch_subagent`, `get_subagent_result`, `wait_for_subagents`, `continue_subagent`, `cancel_subagent`, plus the shared notebook `add_workflow_note` and, inside a subagent, `submit_result`.
* **Memory** — `stm_write`, `stm_read`, `stm_list`, and `ltm_write`, `ltm_read`, `ltm_delete` when long-term memory is on. See [Context and memory](https://docs.oasm.io/architecture/ai-agent/context-and-memory.md).
* **Skills** — `load_skill`.
* **Files** — `save_file` writes to the member's files, `save_template` writes a Nuclei template to the workspace's custom templates. Both re-check the member's write permission.

## Tools by mode

**Ask** mode offers the read tools, memory, skills and files. **Agent** mode adds the action tools, plans and subagents. Tools of the workspace's external MCP servers are offered to the main agent in both modes, and never to subagents. A member can additionally switch individual tools off in their settings; a disabled tool is removed from the set before the run starts.

## The permission check

Before anything else, every built-in tool call checks the permission keys of the member the run acts for, read **at call time** — a permission removed mid-conversation applies to the next call. The rule is the same as for HTTP routes: the wildcard `*`, the exact key, or `x.write` for `x.read`. A missing key returns `Not executed: …` to the model as the tool result, which it reports to the user.

Tools that read the same data as a console route use that route's permission key, so the agent can never see more than the member could in the console. A conversation locked to a project additionally locks every project-aware tool to that project, whatever project id the model passes.

The guard and the approval gate come after this check. See [Guard and approvals](https://docs.oasm.io/architecture/ai-agent/safety.md).

## Fetching the web

`retrieve_web_page` lets the agent read CVE records, advisories and research pages. It reaches outside the platform, so it is not a read-only tool and follows the approval mode. Because the core API sits inside the operator's network, the fetch is also treated as an SSRF risk:

* the host is resolved and **every address** must be public — private, loopback, link-local, carrier-grade NAT and unique-local ranges are refused;
* redirects are followed manually, up to five, and **each hop** is checked again, so a public URL cannot bounce the request into the internal network;
* at most 1 MB is read, 16 KB of text is returned, and the whole fetch gives up after 15 seconds.

## External MCP tools

Tools from MCP servers connected to the workspace are added to the run's set as `<server>_<tool>`. A built-in tool wins any name clash. External tools are not covered by the member permission check — they act with whatever credentials the server holds — so they go through the [guard and approval gate](https://docs.oasm.io/architecture/ai-agent/safety.md), including the built-in deny list. An external tool counts as read-only, and skips the approval prompt, only when its server marks it read-only **and** does not mark it as reaching the outside world. See [MCP](https://docs.oasm.io/architecture/ai-agent/mcp.md).

## Related

> [card] [Guard and approvals](https://docs.oasm.io/architecture/ai-agent/safety.md)
>
> What happens to a call after the permission check

> [card] [Execution on workers](https://docs.oasm.io/architecture/ai-agent/execution.md)
>
> Shell commands, connectors and browser sessions

> [card] [Connectors and MCP](https://docs.oasm.io/ai-studio/connectors.md)
>
> The tools the agent can use, from the user's side


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.