Skip to main content
Glama

Boolean Algebra Operation

boolean_algebra_operation
Idempotent

Evaluate and analyze Boolean polynomials over GF(2): list variables, compute degree, test for zero or one, and reduce expressions for logic simplification.

Instructions

Boolean polynomials over GF(2): evaluate, list variables, degree, and zero/one tests. Prefer this over evaluate_sage for boolean algebra.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionNoWorkspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the same workspace across reconnects and is a bearer credential -- keep it secret. Omit for 'default'.default
operationYesOne of: evaluate, variables, degree, is_zero, is_one, reduce
expressionYesBoolean expression (e.g. 'x*y + x*z + y*z')
num_variablesNoNumber of boolean variables

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.7.0
    • changedInput schema / properties / session / description
      Previous value: -"Named workspace to use. Workspaces have independent variables; omit for 'default'."New value: +"Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the same workspace across reconnects and is a bearer credential -- keep it secret. Omit for 'default'."
  2. Changed1 schema field changedv0.5.0
    • addedInput schema / properties / session
      Added value: +{
      +  "default": "default",
      +  "description": "Named workspace to use. Workspaces have independent variables; omit for 'default'.",
      +  "type": "string"
      +}
  3. First observedv0.3.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already provide idempotentHint=true and destructiveHint=false, covering the safety profile. The description adds useful behavioral context by specifying the mathematical domain (GF(2)) and the set of operations, which is consistent with the annotations. It does not disclose side effects or session behavior, but no annotation contradiction exists.

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?

Two sentences with no filler. The first sentence front-loads the resource and operations, and the second provides routing guidance that earns its place.

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?

With full schema coverage and an output schema, the description does not need to explain parameters or return values. The only notable gap is that the 'reduce' operation is omitted from the operation list, though the operation enum documents it as an option.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents session, operation, expression, and num_variables with defaults/descriptions. The tool description adds no parameter-level detail beyond the general GF(2) context, so the baseline of 3 applies.

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 opening phrase 'Boolean polynomials over GF(2)' names a specific mathematical resource, and the colon list names concrete operations: evaluate, list variables, degree, and zero/one tests. It also explicitly differentiates this tool from evaluate_sage, so an agent can tell what this tool is for without opening 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?

The description gives explicit routing guidance: 'Prefer this over evaluate_sage for boolean algebra.' This names the alternative tool and the condition under which this tool should be selected, leaving little to inference.

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