Skip to main content
Glama

FunSearch harness (evaluate/register/status)

funsearch

Evaluate your Python programs in a sandbox for cap_set or online_bin_packing problems. Register scored programs to a MAP-Elites database and retrieve best variants for iterative evolution.

Instructions

Sandboxed program-search harness (FunSearch): action='evaluate' scores YOUR Python program for problem_id ('cap_set' or 'online_bin_packing') in a no-network/timeout/rlimit sandbox; action='register' stores a scored program in the MAP-Elites DB; action='status' returns the best programs + few-shot context for writing the next variant. Use to iteratively evolve programs — YOU are the generator, mathlas is the deterministic scorer. Args: action, problem_id, then program_src (evaluate/register), score + behavior (register), timeout_s (evaluate), top_k (status).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYes'evaluate' = sandbox-score program_src; 'register' = store a scored program; 'status' = best programs + few-shot context
problem_idYesthe problem: 'cap_set' or 'online_bin_packing'
program_srcNo(evaluate/register) the candidate Python program source — YOU write it; it must define the problem's entry point
scoreNo(register) the score that action='evaluate' returned
behaviorNo(register) the behaviour descriptor from action='evaluate' (selects the MAP-Elites cell)
timeout_sNo(evaluate) hard wall-clock timeout seconds (default 10)
top_kNo(status) elite programs in the few-shot (default 3)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionNo
problem_idYes
okNo(evaluate) program ran + scored
scoreNo
behaviorNo
errorNoagent-actionable: what failed and which args to fix
acceptedNo(register)
best_scoreNo(status)
best_programNo(status)
few_shot_contextNo(status) DATA for you to write the next program
noteNo
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses sandbox constraints (no-network, timeout, rlimit) and the MAP-Elites storage mechanism. However, it does not describe error handling, return format details, or what happens on sandbox failure. The description is adequate but could be more explicit about behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is slightly long but well-structured, front-loading the tool name and main actions. Each sentence provides necessary information without repetition. The use of colons and parentheses organizes action-specific details efficiently. A minor improvement would be breaking into bullet points for even quicker scanning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (7 parameters, 3 actions, evolutionary loop, MAP-Elites DB) and the presence of an output schema (though not shown), the description covers the key workflow: evaluate -> register -> status. It explains the roles of the agent and the system. The main gap is the lack of explicit return format for evaluate/register, but the status action's output is described. Overall, fairly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description adds meaningful context by grouping parameters with actions (evaluate/register/status) and explaining their roles (e.g., 'score the candidate Python program', 'selects the MAP-Elites cell'). This goes beyond the schema's brief descriptions, justifying a 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool is a sandboxed program-search harness with three distinct actions (evaluate, register, status). It specifies the verb ('scores', 'stores', 'returns'), resource (Python programs for specific problems), and scope (sandbox, MAP-Elites DB). This differentiates it effectively from sibling tools like search_existing_math or verify_formal.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Use to iteratively evolve programs — YOU are the generator, mathlas is the deterministic scorer.' This provides clear context for when to use the tool (evolutionary optimization) and the agent's role. While it doesn't list alternatives, the sibling tools are sufficiently different in purpose, so no exclusion is necessary.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Archerkattri/mathlas'

If you have feedback or need assistance with the MCP directory API, please join our Discord server