Human list
mars tools list
Prints one registered tool name per line.
Tools and MCP
Tools are the actions MARS is allowed to take: read files, run
checks, update tickets, write release notes, inspect trust, and
more. The same actions are available to MARS agents, to
mars tools run, and to local AI clients through MCP.
Use tools when you want a repeatable action with the same repo path, trust rules, JSON input, and output limits that agents use.
| Surface | Command | Use |
|---|---|---|
| Discover tools | mars tools list --json | Print OpenAI-style tool definitions from the registered built-in registry. |
| Run one tool | mars tools run <name> --repo /path --args-json '{...}' | Execute a registered tool through the same executor and policy path as agents. |
| Expose MCP | mars mcp serve --repo /path --trust observer | Launch a stdio MCP server for local clients. |
| Role agent runs | mars run engineer --repo /path | Tools are filtered by execution profile, then role trust, manifest allowlist, and policy. |
| Harness manifest | .harness/manifest.yaml | Target owners decide which tools each role may use. |
Use tools list when you need to see what the installed
binary actually exposes. The JSON form is the best input for
another model, MCP adapter, or local integration.
mars tools list
Prints one registered tool name per line.
mars tools list --json
Prints tool names, descriptions, and JSON schemas in an OpenAI-style format.
tools run executes one tool with JSON object
arguments. It resolves the repository root, applies the requested
trust level, enforces output limits, and returns either formatted
model output or structured JSON.
mars tools run git_status \
--repo ~/my-project \
--args-json '{}' \
--json
mars tools run grep \
--repo ~/my-project \
--args-json '{"pattern":"MarsDocSync","glob":"**/*.go"}'
mars tools run record_decision \
--repo ~/my-project \
--trust contributor \
--execution-profile host \
--acknowledge-host-execution \
--args-json '{"title":"Use local model override","decision":"Route engineer to repo-coder for validation."}'
Observer profile independently blocks mutating tools. Host execution has the current OS user's full authority and is not containment; contributor trust remains a separate gate.
mars tools run file_read \
--repo ~/my-project \
--max-output-bytes 6000 \
--args-json '{"path":"README.md"}'
mars mcp serve starts a newline-delimited JSON-RPC
stdio MCP server. Configure an MCP-compatible client to launch the
command locally. The server exposes tools/list and
tools/call against the MARS tool registry.
mars mcp serve \
--repo ~/my-project \
--trust observer \
--role mcp-client
Use observer by default. It can inspect, but mutating tools are blocked.
mars mcp serve \
--repo ~/my-project \
--trust contributor \
--execution-profile host \
--acknowledge-host-execution \
--role mcp-client \
--allowlist file_read,grep,mars_cli,git_status,record_decision
Use acknowledged host plus contributor trust only for a trusted local client and keep the allowlist as narrow as possible. Host acknowledgement does not upgrade trust.
{
"mcpServers": {
"mars": {
"command": "mars",
"args": [
"mcp",
"serve",
"--repo",
"/absolute/path/to/my-project",
"--trust",
"observer"
]
}
}
}
Use an absolute repo path so the MCP client does not depend on its launch directory.
MARS applies three separate gates: execution profile must admit the authority, trust must permit the action, and the tool must be exposed by the allowlist. Role runs also use the role's manifest allowlist; target configuration cannot grant host authority.
| Gate | Where it is set | How users should apply it |
|---|---|---|
| Execution profile | --execution-profile observer|host|isolated | Observer is the default and blocks every mutator. Host requires --acknowledge-host-execution; isolated is unavailable. |
| Role manifest allowlist | .harness/manifest.yaml | Give each role the smallest tool set that can do its job. |
| CLI run allowlist | mars tools run --allowlist | Defaults to the named tool. Use only when a tool call needs a specific set. |
| MCP allowlist | mars mcp serve --allowlist | Use a narrow list for external clients, especially with contributor trust. |
| Observer trust | --trust observer | Safe default for read-only inspection. Mutating tools are blocked. |
| Contributor trust | --trust contributor | Permits governed mutation only inside acknowledged-host execution. |
| Autonomous trust | Role trust store and policy. | Reserved for roles that have earned more autonomy through evidence. |
mars trust --repo ~/my-project
mars trust set engineer ~/my-project contributor \
--reason "Human approved bounded write access"
Use the target repo path for the common path. Advanced repo-ID-oriented edits should pass the matching --db and line up with registered state.
The exact installed set is authoritative from
mars tools list. These categories explain how users
should think about the built-in surface.
| Category | Representative tools | User purpose |
|---|---|---|
| File inspection | file_read, file_search, grep, code-intel tools | Read known files, search bounded globs, and inspect code graph context. See the Code Intelligence Reference. |
| File mutation | file_write | Create or update repo files with docsync and policy checks. |
| Shell execution | shell_exec | Run subprocesses through policy, validation, background process, and output controls. Commands still have the current operating-system user's full authority; these controls are not a security sandbox. |
| MARS command bridge | mars_cli | Run MARS commands through a structured argv path that avoids stale binary and shell parsing mistakes. |
| Git lifecycle | git_status, git_commit, git_push | Inspect, commit, and publish work under trunk and safety rules. |
| Ticket and planning | ticket_create, record_decision, disposition tools | Create durable work and decisions rather than leaving them in chat. |
| Documentation and doctrine | docsync_audit, doctrine sync tools | Keep code, feature contracts, design docs, and generated harness doctrine aligned. |
| Dependency and workspace health | dependency_sync, workspace_hygiene | Repair dependencies and detect unsafe workspace state. |
| Meta tools | tool_create, persona_create, tool_creation_guard | Create or validate new tools and personas through governed paths. |
Users and external agents should choose the most specific governed capability that fits the job. This makes runs easier to audit and keeps safety policy effective.
mars_cli for MARS behaviorSetup, init, upgrade, doctor, scan, run, start, release, scores, trust, models, and update workflows belong through mars_cli in agent runs.
Prefer file_read, file_search, and grep for ordinary inspection. Use file_write for controlled mutation.
shell_exec is host-only and is for tests, builds, runtime probes, and subprocesses where no purpose-built tool fits. Treat every permitted command as host execution with the current operating-system user's full authority.
Important discoveries, architecture decisions, and intervention outcomes belong in repo artifacts through the appropriate tools.
Repeated, risky, validation-heavy, or likely-to-recur procedures
should become first-class tools instead of staying as chat memory or
ad hoc shell scripts. New built-in tools must originate through
tool_create unless a prior durable decision explains
why the meta-tool path was bypassed.
Create a tool when the process is repeated, risky, validation-heavy, or broadly reusable across foundation and deployed harnesses.
mars tools run tool_create \
--repo . \
--trust contributor \
--execution-profile host \
--acknowledge-host-execution \
--args-json '{"tool_name":"example_tool"}'
Complete the generated Go implementation, registration, trust policy, allowlists, tests, and documentation.
mars tools run tool_creation_guard \
--repo . \
--args-json '{"tool_name":"example_tool"}'
External clients should treat MARS as the source of tool truth rather than recreating local shell shortcuts. Use observer profile for read-only support and acknowledged host plus contributor trust only when the client should mutate the repo.
| Client need | Recommended setup | Why |
|---|---|---|
| Read-only repository understanding. | mars mcp serve --repo /path --trust observer --allowlist file_read,file_search,grep,git_status | Prevents accidental mutation while still exposing useful context tools. |
| MARS lifecycle command access. | Add mars_cli to the allowlist. | Routes MARS commands through the active harness executable and structured args. |
| Controlled docs or ticket edits. | Use acknowledged host plus contributor trust with file_read,file_write,git_status,record_decision,ticket_create. | Allows mutation while keeping policy, docsync, and durable-record rules active. |
| Tool development. | Use acknowledged host plus contributor trust and include tool_create, tool_creation_guard, test tools, and git tools. | Keeps formalized tool creation auditable. |
| Symptom | Likely cause | User action |
|---|---|---|
tools run says a tool is not allowed. | The named tool is outside the active allowlist. | Pass a narrower correct --allowlist, or use the default named-tool allowlist. |
| A mutating tool is blocked. | The execution profile or trust level is observer. | Use --execution-profile host --acknowledge-host-execution --trust contributor only when mutation and current-user host authority are intended and authorized. |
| MCP client cannot find repo files. | The MCP server was launched with the wrong working directory or a relative repo path. | Configure --repo /absolute/path/to/repo. |
| Output is truncated. | The executor output budget was reached. | Use a more specific tool query or raise --max-output-bytes deliberately. |
| Direct shell MARS command fails in an agent run. | Policy prefers the mars_cli tool for MARS commands. | Use mars_cli or the operator CLI outside the agent run. |
| New tool work fails review. | The governed tool_create path or documentation sync was skipped. | Run tool_creation_guard, update design docs, tests, registration, allowlists, and MarsDocSync metadata. |