Skip to main content
Glama

FunSearch harness (evaluate/register/status)

funsearch

Sandbox-score Python programs for cap_set or online_bin_packing, register results, and retrieve elite programs to iteratively evolve better solutions.

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
Behavior4/5

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

Annotations are neutral (no readOnly/destructive/idempotent hints). Description adds behavioral context: sandbox (no-network, timeout, rlimit), MAP-Elites DB storage, few-shot context retrieval. This goes beyond structured fields.

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?

Description is 4 sentences, well-structured, front-loaded with purpose. Could be slightly more concise but effectively communicates key workflow.

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 complexity (7 params, 3 actions) and presence of output schema (not shown), description covers core workflow and returns. Might miss edge cases (e.g., error handling on invalid program_src), but sufficient for iterative evolution use case.

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 coverage is 100%, but description adds action-specific context (e.g., 'program_src — YOU write it', 'behavior — selects MAP-Elites cell'). Clarifies conditional parameters per action.

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?

Description clearly states tool is a sandboxed program-search harness with three explicit actions (evaluate, register, status) and problem IDs. Distinct from sibling tools like verify_formal or search_directive.

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?

Provides guidance 'Use to iteratively evolve programs — YOU are the generator, mathlas is the deterministic scorer.' Implicitly suggests when to use (evolution loop) and mentions sandbox constraints, but doesn't explicitly list when not to use or compare to siblings.

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