Skip to main content
Glama

Explain a PHP error

explain_php_error
Read-onlyIdempotent

Turn one PHP error message into the current English manual page for the function or method it names. Returns the manual URL, version line, signature, description, and first example. Use it when the agent has the error text. A message that names no function returns not_found. The first 5 successful calls each UTC day from one network address are free and need no key. A not_found, bad_range, or fetch_failed is not charged and does not use a free call. After the 5, send X-API-Key. A key call costs 0.04 credit only on success. Key: https://firm.bestsmartgoods.com/signup

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "error": "<error>"
    },
    "name": "explain_php_error"
  }
}

Input Schema

NameRequiredDescriptionDefault
errorYesThe PHP error text, for example Call to undefined function each().
versionNoRelease to check against the manual version line, for example 8.3. The page is still the current manual.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the read-only, idempotent, non-destructive annotations, the description adds substantial operational context: the returned fields, the not_found behavior, which failures are not charged, the free-call limit, and when an API key is required. This is rich behavioral disclosure that helps an agent predict outcomes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose and return fields are front-loaded, and most sentences provide useful operational detail. The billing and signup details are somewhat lengthy, but they are relevant to whether and how the tool can be called.

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?

For a two-parameter, read-only lookup tool without an output schema, the description gives enough detail about output fields, error cases, authentication, and charging. An agent has what it needs to call the tool 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 description coverage is 100%, so both the error and version parameters are already documented in the schema. The description reinforces that the input is one PHP error message but adds little specific meaning for the version parameter beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: turn one PHP error message into the manual page for the named function or method. It does not explicitly distinguish itself from sibling tools such as query_php_docs, but the error-text input makes its role reasonably clear.

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?

It gives clear usage context: use it when the agent has the error text, and it explains that a message naming no function returns not_found. It does not explicitly compare against query_php_docs or check_php_upgrade, so there is no full when-not/alternatives guidance.

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.