Skip to main content

Overview

Tools are functions the LLM can call during the agent loop. MeepaGateway registers a set of built-in tools for every agent, filtered by the agent’s allow/deny configuration. MCP servers add additional tools from external processes. All tools are exposed to the LLM with a name, description, and JSON Schema for their parameters.

Built-in Tools

shell

Execute a shell command in the agent’s workspace directory. Parameters: Returns: stdout, stderr, and exit code. When isolation.enabled = true, shell commands run inside the Docker container. When isolation.enabled = false and container_mode.runtime = "none", commands run on the host subject to allowed_commands filtering.

read_file

Read a file from disk. Parameters: Access is validated against allowed_dirs. Reads outside allowed directories are rejected.

write_file

Write content to a file. Parameters: Access is validated against allowed_dirs before writing.

web_fetch

Fetch a URL and return its content. Parameters: Returns the response body as text. HTML is returned as-is; the LLM handles parsing.
Search the web using the Brave Search API. Parameters: Requires web_search_enabled = true on the agent and a valid Brave API key configured via BRAVE_API_KEY.

memory_store

Store a fact in the long-term SQLite fact store. Parameters:
Search stored facts using full-text search (FTS5). Parameters: Returns a ranked list of matching facts with IDs, content, source, and timestamps.

memory_delete

Delete a stored fact by ID. Parameters:

memory_note

Append a note to MEMORY.md or USER.md. Parameters:

memory_read

Read the full contents of MEMORY.md or USER.md. Parameters:

soul_read

Read the agent’s current SOUL.md persona file. Parameters: none

soul_edit

Replace the entire SOUL.md content. Parameters:

Tool Access Control

Tools are filtered per-agent using allow and deny lists. The registry applies them at startup:
  • If allow is non-empty, only listed tools are available (allowlist wins)
  • If deny is non-empty, listed tools are excluded
  • If both are empty, all registered tools are available

File Access Control

read_file and write_file validate paths against file_access, enforced regardless of container mode settings:
An empty allow_read_write list means unrestricted access (default). Add directories to restrict file tool access to specific paths.

Custom Tools via MCP

Agents can access tools from external MCP (Model Context Protocol) servers. MCP tools appear alongside built-in tools — the LLM cannot distinguish them. See MCP for configuration.

Configuration Reference