Skip to main content
Glama

truth-table-generator

Read-onlyIdempotent

Generate the full truth table for a Boolean expression. Parses operators AND/OR/NOT/XOR/NAND/NOR/IMPLIES/IFF and their symbols, enumerates all 2^N variable assignments, and returns the result for each row plus the value of every sub-expression. Supports up to 6 variables (64 rows).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYesA Boolean expression. Operators: AND/OR/NOT/XOR/NAND/NOR/IMPLIES/IFF (case-insensitive) and symbols && || ! ^ -> <->. Variables are letters or short names (≤ 8 chars). Constants TRUE/FALSE/1/0 supported. Max 6 distinct variables.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsYesEvery row of the truth table.
canonicalYesParenthesized canonical form of the input expression.
variablesYesVariable names in first-appearance order, upper-cased.
isTautologyYesTrue if every row evaluates to true.
isContradictionYesTrue if every row evaluates to false.
subExpressionLabelsYesSub-expression strings shown as extra columns, in evaluation order.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=true, idempotentHint=true, destructiveHint=false), the description details the parsing of operators, enumeration of variable assignments, and the output of both row results and sub-expression values. It also explicitly states the maximum number of rows (64) and variable limit (6), which are important behavioral traits not captured in annotations. No 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?

The description is succinct: two sentences that front-load the primary purpose, followed by essential details on operators, behavior, and limits. Every clause adds value, with no redundant or filler information. It is well-structured for quick comprehension.

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?

Given the presence of an output schema (which presumably details return structure), the description need not elaborate on return values. It covers all necessary operational aspects: what the tool does, supported operators, variable limits, and output granularity. This is complete for a tool of this complexity.

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?

The input schema already provides a comprehensive description of the 'expression' parameter, covering operators, symbols, variables, constants, and limits (100% coverage). The description adds some context about parsing and output, but doesn't introduce new parameter-specific semantics beyond what the schema already states. Thus, the baseline score of 3 is appropriate.

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 opens with a specific verb and resource: 'Generate the full truth table for a Boolean expression.' It clearly distinguishes this tool from siblings by focusing on truth-table generation, which is unique among the listed tools. It also outlines the scope (Boolean expressions, up to 6 variables) without ambiguity.

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 provides clear context for when to use the tool: whenever a full truth table for a Boolean expression is needed. It does not explicitly mention alternatives or when not to use it, but there are no obvious sibling tools with overlapping functionality. The operational constraints (up to 6 variables, supported operators) effectively guide the user on applicability.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A3.9/5.0
Disambiguation4/5

Most tools have distinct purposes. However, 'hex-to-rgb' is redundant with 'color-converter', which already handles hex-to-RGB conversion, causing potential confusion.

Naming Consistency4/5

Names follow a consistent lowercase-with-hyphens style, but vary in pattern (e.g., 'angle-converter', 'average-calculator', 'dedup-lines'). One tool ('internal-do-not-call') deviates from the descriptive norm.

Tool Count2/5

With 46 tools, the server is heavily populated. Many converters could be merged into a generic unit converter, and there is redundancy, making the surface unnecessarily large for a single server.

Completeness4/5

The server covers a broad range of utility domains: converters, text processing, math, cryptography, etc. Minor redundancies exist (e.g., hex-to-rgb vs color-converter), but the set is otherwise comprehensive.

Resources