Skip to main content
Glama

diagnose

Read-onlyIdempotent

Explain why a logical query holds, why it fails, or the missing facts that would make it true.

Instructions

Explain why a query holds, why it fails, or what would make it true.

Reach for this when reason returns something you did not expect. Modes:

  • why: the goal holds and you want the derivation.

  • why_not: the goal fails and you want the missing facts or rules named. Reports predicates with no definition at all, then the deepest sub-goals that could not be proved.

  • what_needs: the goal fails and you want the smallest set of facts that would make it true (bounded to 3 assumptions over base predicates).

Returns DiagnosisResult:

  • ok (bool): false when the request could not be evaluated.

  • holds (bool): whether the goal currently holds.

  • findings (list of str): observations, most actionable first.

  • conclusion (str): a human-readable summary; for why it includes the rendered derivation.

  • proof (object | null): the derivation tree, present when the goal holds.

  • error (str | null): a readable message when ok is false.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesFalse when the request could not be evaluated.
errorNoReadable, actionable message when ok is False.
holdsNoWhether the goal currently holds.
proofNoDerivation, present for `why` when the goal holds.
findingsNoObservations: missing predicates, unprovable goals.
conclusionNoHuman-readable summary of the diagnosis.
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description adds behavioral context by explaining the three modes, return format (DiagnosisResult), error handling (ok and error fields), and limitations like bounded assumptions. No contradictions with annotations.

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 well-structured with a clear opening statement, followed by mode explanations and return field details. Every sentence serves a purpose, and the information is front-loaded. No redundant or fluff content.

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 tool's complexity (diagnosis with multiple modes, specific input language, and structured output), the description covers all necessary aspects: when to use, mode details, input format, and output fields (including error conditions). Output schema exists but the description explains the fields for clarity.

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 input schema includes descriptions for all parameters, so baseline is 3. The description adds value by elaborating on query syntax, knowledge base format, and mode behavior beyond the schema's brief descriptions. For example, it explains variables with $, conjunction with AND, and the max assumptions for what_needs mode.

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 clearly states the tool's purpose: 'Explain why a query holds, why it fails, or what would make it true.' It also distinguishes from siblings by explicitly referencing the 'reason' tool and advising to use when 'reason returns something you did not expect.'

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 explicitly says 'Reach for this when reason returns something you did not expect,' providing clear context for when to use. It also details three modes with specific use cases. However, it does not explicitly mention when not to use it or compare with other siblings like what_if or check_kb.

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

Install Server

Other Tools

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/snegi26/euclidMCPPaper'

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