Skip to main content
Glama

truth_table

Create a truth table for any boolean expression. Evaluate logical statements like 'a and b or not c' to display each row of truth values.

Instructions

Build the truth table for a boolean expression: 'a and b or not c', 'p xor q', 'a implies b'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYes

Schema Changelog

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

  1. Changed4 schema fields changedv0.2.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / expression / title
      Added value: +"Expression"
    • addedInput schema / title
      Added value: +"truth_tableArguments"
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It explains that it builds a truth table and gives examples of supported operators, but it omits important behavioral details such as output format, operator precedence, handling of parentheses, and potential limitations. This is a moderate gap given no other structured information.

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 a single sentence that starts with the action 'Build', immediately communicates the core purpose, and includes useful examples without unnecessary fluff. Every element earns its place and is easy to scan.

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 the tool's simplicity (one string parameter, no output schema), the description provides sufficient context to understand the tool's purpose and input format. It covers supported operators and example usage. It could add details about the return representation, but for a straightforward truth table generator this is adequate.

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?

The schema provides no description for the 'expression' parameter (0% coverage), so the description compensates by specifying it takes a boolean expression and offering concrete examples. This adds meaningful context about expected syntax and supported operators, though it could be even more precise about the exact grammar.

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 uses a specific verb 'Build' and resource 'truth table for a boolean expression', making the tool's purpose immediately clear. It also distinguishes itself from sibling tools like calc_exact or solve_expression by focusing on truth table generation rather than general evaluation.

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 implies when to use it by providing example expressions ('a and b or not c', 'p xor q', 'a implies b') that illustrate the expected input format. However, it does not explicitly state when not to use it or contrast with alternative tools such as evaluate_expression or solve_expression, so it lacks full exclusion guidance.

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

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/The-40-Thieves/codecalc'

If you have feedback or need assistance with the MCP directory API, please join our Discord server