Skip to main content
Glama

Factor

factor
Read-onlyIdempotent

Factor a polynomial into irreducible factors. Input polynomial (e.g., "x^2-1" or "x^2+3x+2"). Returns factored form.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYesPolynomial expression to factor (e.g., "x^2-1", "x^2+3x+2")

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYesThe input polynomial expression
resultYesFactored form of the polynomial or null
operationYesOperation name (factor)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "input": {
      +      "description": "The input polynomial expression",
      +      "type": "string"
      +    },
      +    "operation": {
      +      "description": "Operation name (factor)",
      +      "type": "string"
      +    },
      +    "result": {
      +      "description": "Factored form of the polynomial or null",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "operation",
      +    "input",
      +    "result"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "expression": "x^2-1"
      +  },
      +  {
      +    "expression": "x^2+3x+2"
      +  }
      +]
  3. First observed

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare the tool as read-only, idempotent, and non-destructive, so the description doesn't need to restate that. It adds the fact that output is factored form, but does not discuss edge cases like non-factorable polynomials or coefficient domains, which is a minor gap.

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 clear sentences front-load the purpose and include examples. Every word contributes, with no fluff or redundancy.

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 simplicity, the single parameter is fully documented, safety is covered by annotations, and an output schema exists. The description covers the essential input/output contract sufficiently for an agent to use it correctly.

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 coverage is 100% and the parameter is fully described. The description adds examples, but these are already present in the schema, so it provides no additional semantic value beyond what the schema already offers.

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 'factor' with a specific resource 'polynomial' and clarifies the output as 'irreducible factors'. This clearly distinguishes it from sibling tools like simplify and derive.

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 by specifying the input format (polynomial expression) and output (factored form), which implies when to use it. However, it does not explicitly contrast with alternatives or provide exclusions, so it falls short of a 5.

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.