Built-in Tools
LeafMesh ships a set of built-in tools across several categories, all automatically registered when LeafMesh loads. Every LLM agent is additionally pre-injected — with no configuration — with schedule_followup (see Self-Scheduled Follow-ups), and, when the corresponding config is present, recall_memory (memory) and query_knowledge (knowledge).
Math Tools
calculator
Safe mathematical expression evaluation.
| Parameter | Type | Description |
|---|---|---|
expression | string | Math expression (max 500 chars) |
Supports: +, -, *, /, //, %, unary operators.
random_number
Generate random integers.
| Parameter | Type | Default | Description |
|---|---|---|---|
min_val | integer | 1 | Minimum value |
max_val | integer | 100 | Maximum value |
count | integer | 1 | How many (max 1000) |
Time Tools
current_time
Get current date and time.
| Parameter | Type | Default | Description |
|---|---|---|---|
timezone | string | "UTC" | Timezone name |
time_format | string | "iso" | "iso", "human", "timestamp", or strftime |
time_difference
Calculate time between two ISO timestamps.
| Parameter | Type | Description |
|---|---|---|
start_time | string | ISO format start |
end_time | string | ISO format end |
unit | string | "seconds", "minutes", "hours", "days" |
Text Tools
text_analyzer
Analyze text properties: character count, word count, sentence count, etc.
| Parameter | Type | Default | Description |
|---|---|---|---|
text | string | — | Text to analyze |
analysis_type | string | "all" | "basic", "detailed", or "all" |
text_formatter
Format text: uppercase, lowercase, title, reverse, capitalize, remove_spaces, add_prefix, add_suffix, wrap_lines.
| Parameter | Type | Description |
|---|---|---|
text | string | Text to format |
format_type | string | Formatting operation |
options | object | Additional options |
Web Tools
web_request
HTTP requests (GET, POST, PUT, DELETE). Requires confirmation. SSRF-protected.
| Parameter | Type | Default | Description |
|---|---|---|---|
url | string | — | Target URL |
method | string | "GET" | HTTP method |
headers | object | {} | Request headers |
data | object | {} | Request body |
timeout | number | 10 | Timeout seconds |
Data Tools
json_formatter
Format and validate JSON: "pretty", "compact", "validate".
data_converter
Convert between formats (json ↔ text).
Reasoning Tools
chain_of_thought
Step-by-step reasoning through problems. Styles: analytical, creative, logical, intuitive, systematic, exploratory.
metacognitive_reflection
Evaluate reasoning quality: strengths, weaknesses, bias check, improvement suggestions.
thinking: true on an LLM agent gives it these two tools plus apply_edits. They are text only — none of them runs code.
Sandbox Tool
sandbox_exec
Runs Python or shell in a contained sandbox and returns {stdout, stderr, exit_code, error, truncated}. It is given automatically to an LLM agent with sandbox: set — you do not list it under tools: — and only when the server can contain code. No network unless you allow hosts. See LLM Agents → Running Code.
| Parameter | Type | Default | Description |
|---|---|---|---|
code | string | required | The complete program |
language | string | python | python or shell |
System Tools
system_info
Platform info, Python version, current time, working directory.
Board & Experience Tools
These are given automatically — you do not list them under tools:.
An agent on a shared board gets view_board,
add_task, pull_task, update_checklist, update_task and finish_task to
take, track and close work.
An agent with experience gets remember and
recall_experience to keep and recall what it learned from its own work.
An agent with a playbook gets playbook to load one of its
responsibilities when a request needs it.
Assigning Tools to Agents
agents:
research_agent:
name: "research_agent"
tools: ["web_request", "calculator", "current_time"]
tool_choice: "auto"
max_tool_calls_per_message: 5
allow_parallel_tool_calls: trueWhen an agent requests several independent tools in one step, LeafMesh runs them concurrently (order-preserving). The concurrency ceiling is set by the limits.max_parallel_tool_calls config field (default 8). Set allow_parallel_tool_calls: false on an agent to force its tools to run one at a time.
Every LLM agent is also pre-injected with schedule_followup, which lets it resume its own work later in the same session — no configuration required.
Tool Execution Flow
- Tool schemas sent to LLM alongside the prompt
- LLM decides when to call tools (with
tool_choice: "auto") - LeafMesh validates permissions and runs the tool
- Results returned to LLM for follow-up response
- Loop continues until no more tool calls or
max_tool_calls_per_messagereached
Next Steps
- Custom Tools — Register your own tools
- Tool Permissions — Access control details
- Tool System API — API reference
LeafMesh — 17 built-in tools