Skip to main content
Glama

boolean_algebra_operation

Idempotent

Evaluate, reduce, and analyze Boolean polynomials over GF(2): list variables, compute degree, and test zero or one. Use for Boolean algebra instead of general expression evaluation.

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

A3.8/5.0
Behavior2/5

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

Annotations already carry the behavioral profile (idempotent, non-destructive, not read-only, closed-world), and the description adds nothing beyond what those flags say. Notably it does not explain why readOnlyHint is false for what read like pure computations, nor how the session/workspace state is affected.

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, zero filler, with purpose stated first and the routing hint second. Every clause 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?

Output schema exists, so return values need not be described, and params are fully covered by the schema. Minor gap: the operation enum includes 'reduce', which the description omits, and the non-read-only annotation is left unexplained.

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 documents session, operation, expression, and num_variables on its own. The description adds only loose mapping of operation names and 'Boolean expression', which is baseline-level value over the schema.

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?

Names a specific domain ('Boolean polynomials over GF(2)') and enumerates the concrete operations (evaluate, list variables, degree, zero/one tests). It also explicitly separates itself from the nearest sibling by naming evaluate_sage, so an agent can distinguish the two without opening either schema.

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?

'Prefer this over evaluate_sage for boolean algebra' gives an explicit routing rule with the condition that selects it. It stops short of stating when NOT to use it or naming other overlapping siblings (e.g. polynomial_ring_operation, number_theory_operation).

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