Tools for agents: Exact linear-system solver

Solve rational linear equations and return a verifiable solution, nullspace basis, or explicit inconsistency.

Connect with MCP

{
  "mcpServers": {
    "super-agent-tools": {
      "url": "https://app.getsupers.com/sites/agent-linear-system/mcp"
    }
  }
}
Streamable HTTP · No API key · Stateless

Use this URL in any client supporting remote Streamable HTTP MCP. Calls return structured JSON; inputs are processed without persistence.

Call solve_linear_system

Solves A*x=b. Send integers or quoted decimal/fraction strings; JSON floats are rejected to avoid binary rounding. All numeric results are exact fraction strings. Columns are zero-based. For infinite solutions, x = particular_solution + sum(t_i * nullspace_basis[i]), with arbitrary rational parameters t_i. An inconsistent system has no particular solution or residual; its returned basis still describes the homogeneous system A*x=0. Intended for small exact systems; not a floating-point least-squares solver. Rational arithmetic uses Python fractions: https://docs.python.org/3/library/fractions.html

Input and output schemas
{
  "name": "solve_linear_system",
  "title": "Exact linear-system solver",
  "description": "Solve A*x=b exactly using rational arithmetic. Input integers or decimal/fraction strings. Return a particular solution, nullspace basis, RREF and exact residual; report inconsistent systems explicitly.",
  "inputSchema": {
    "properties": {
      "coefficients": {
        "items": {
          "items": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ]
          },
          "type": "array"
        },
        "title": "Coefficients",
        "type": "array"
      },
      "constants": {
        "items": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "string"
            }
          ]
        },
        "title": "Constants",
        "type": "array"
      }
    },
    "required": [
      "coefficients",
      "constants"
    ],
    "title": "solve_linear_systemArguments",
    "type": "object"
  },
  "outputSchema": {
    "properties": {
      "status": {
        "enum": [
          "unique",
          "infinite",
          "inconsistent"
        ],
        "title": "Status",
        "type": "string"
      },
      "rank": {
        "title": "Rank",
        "type": "integer"
      },
      "variables": {
        "title": "Variables",
        "type": "integer"
      },
      "pivot_columns": {
        "items": {
          "type": "integer"
        },
        "title": "Pivot Columns",
        "type": "array"
      },
      "free_columns": {
        "items": {
          "type": "integer"
        },
        "title": "Free Columns",
        "type": "array"
      },
      "particular_solution": {
        "anyOf": [
          {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          {
            "type": "null"
          }
        ],
        "title": "Particular Solution"
      },
      "nullspace_basis": {
        "items": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "title": "Nullspace Basis",
        "type": "array"
      },
      "reduced_augmented_matrix": {
        "items": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "title": "Reduced Augmented Matrix",
        "type": "array"
      },
      "residual": {
        "anyOf": [
          {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          {
            "type": "null"
          }
        ],
        "title": "Residual"
      }
    },
    "required": [
      "status",
      "rank",
      "variables",
      "pivot_columns",
      "free_columns",
      "particular_solution",
      "nullspace_basis",
      "reduced_augmented_matrix",
      "residual"
    ],
    "title": "LinearResult",
    "type": "object"
  },
  "icons": null,
  "annotations": {
    "title": null,
    "readOnlyHint": true,
    "destructiveHint": false,
    "idempotentHint": true,
    "openWorldHint": false
  },
  "meta": null,
  "execution": null
}

Run the example to see the actual result.

HTTP alternative

POST https://app.getsupers.com/sites/agent-linear-system/call
Content-Type: application/json

{
  "coefficients": [
    [
      2,
      1,
      -1
    ],
    [
      -3,
      -1,
      2
    ],
    [
      -2,
      1,
      2
    ]
  ],
  "constants": [
    8,
    -11,
    -3
  ]
}

The HTTP and MCP interfaces execute the same implementation. Validation errors are returned explicitly. See the tool notes above for its supported inputs and behavior.