Built-in Tools

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.

ParameterTypeDescription
expressionstringMath expression (max 500 chars)

Supports: +, -, *, /, //, %, unary operators.

random_number

Generate random integers.

ParameterTypeDefaultDescription
min_valinteger1Minimum value
max_valinteger100Maximum value
countinteger1How many (max 1000)

Time Tools

current_time

Get current date and time.

ParameterTypeDefaultDescription
timezonestring"UTC"Timezone name
time_formatstring"iso""iso", "human", "timestamp", or strftime

time_difference

Calculate time between two ISO timestamps.

ParameterTypeDescription
start_timestringISO format start
end_timestringISO format end
unitstring"seconds", "minutes", "hours", "days"

Text Tools

text_analyzer

Analyze text properties: character count, word count, sentence count, etc.

ParameterTypeDefaultDescription
textstring—Text to analyze
analysis_typestring"all""basic", "detailed", or "all"

text_formatter

Format text: uppercase, lowercase, title, reverse, capitalize, remove_spaces, add_prefix, add_suffix, wrap_lines.

ParameterTypeDescription
textstringText to format
format_typestringFormatting operation
optionsobjectAdditional options

Web Tools

web_request

HTTP requests (GET, POST, PUT, DELETE). Requires confirmation. SSRF-protected.

ParameterTypeDefaultDescription
urlstring—Target URL
methodstring"GET"HTTP method
headersobject{}Request headers
dataobject{}Request body
timeoutnumber10Timeout 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.

ParameterTypeDefaultDescription
codestringrequiredThe complete program
languagestringpythonpython 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: true

When 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

  1. Tool schemas sent to LLM alongside the prompt
  2. LLM decides when to call tools (with tool_choice: "auto")
  3. LeafMesh validates permissions and runs the tool
  4. Results returned to LLM for follow-up response
  5. Loop continues until no more tool calls or max_tool_calls_per_message reached

Next Steps


LeafMesh — 17 built-in tools

Last updated: 11/10/2026