Skip to main content
Glama
szeider
by szeider

select_backend

Choose a solver backend and initialize a persistent IPython kernel with the solver library, helper functions, and modeling instructions for constraint problems.

Instructions

Start solving a constraint problem: call this FIRST, once per problem.

Sets up a persistent IPython kernel preloaded with the backend's solver library and helper functions, and returns the modeling instructions for that backend. Calling it again recycles the kernel for a new problem (previous session state is cleared).

Backends:

  • pysat: Boolean satisfiability — feasibility, combinatorial search

  • maxsat: weighted optimization over Boolean constraints

  • z3: SMT — integers/reals/bitvectors, proofs, program verification

  • cpmpy: finite-domain constraint programming — scheduling, assignment, puzzles

  • clingo: Answer Set Programming — logic rules, defaults, reachability

  • didp: dynamic programming (state-space search) — routing, sequencing, packing

Unsure which backend fits? Read the resource mcp-solver://guide first.

Then iterate with python_exec (write, run, verify against the problem statement), and finish by calling submit_code with the final, verified, self-contained program. UNSAT / "no solution exists" is a valid outcome.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
solverYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.1.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and delivers: persistent kernel lifetime, that re-invocation clears previous session state, that it returns modeling instructions, and that UNSAT is a legitimate terminal outcome. These are exactly the behavioral traits an agent needs and that the schema does not express.

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

Conciseness5/5

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

Front-loaded imperative first sentence, then setup behavior, then the backend list, then the workflow tail. The bulleted backend table is dense with information and every line earns its place; no filler.

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

Completeness5/5

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

No output schema exists, but the description says what is returned (modeling instructions) and sketches the full three-stage workflow ending in submit_code. For a single-parameter entry-point tool, an agent has everything required to select and invoke it correctly.

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 0% and the single 'solver' parameter has no enum, so the description must supply the value domain — and it does, enumerating all six backends with a one-line semantic gloss each (e.g. 'z3: SMT — integers/reals/bitvectors, proofs, program verification'). It does not explicitly state that these strings are the accepted values of the solver argument, so the mapping is inferred rather than stated.

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?

Specific verb+resource: 'Start solving a constraint problem' and sets up a persistent IPython kernel preloaded with the backend solver library. It explicitly positions itself against siblings by naming the full workflow (python_exec to iterate, submit_code to finish), so an agent can place it without opening other schemas.

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

Usage Guidelines5/5

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

Explicit when-to-use ('call this FIRST, once per problem'), re-use semantics ('Calling it again recycles the kernel for a new problem'), an escape hatch for uncertainty ('Unsure which backend fits? Read the resource mcp-solver://guide first'), and the follow-on tools. Nothing is left to inference.

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