Skip to main content
Glama

Read a PHP or WordPress manual page

query_php_docs
Read-onlyIdempotent

Read one current English manual page for a PHP symbol or a WordPress function, hook, or class. Returns the official page URL, the version line, the signature, the description, and the first official example. php.net pages are the live English HTML manual. WordPress pages are the live developer.wordpress.org reference. This is not an archive of older manuals and it does not search Laravel, Symfony, or Markdown docs. The first 5 successful pages each UTC day from one network address are free and need no API key. A not_found or fetch_failed does not use a free page. After the 5, send header X-API-Key. A key call costs 0.04 credit only when a page is returned. Pass the symbol, for example str_contains or wp_insert_post. Set source to php or wordpress, or omit it and a wp_ name uses WordPress. Set version, for example 8.3 or 6.7, to learn whether that release is covered by the page version line. version_applies is null when version is omitted or the page has no version line. User comments are not included. 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": {
      "query": "<query>"
    },
    "name": "query_php_docs"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesA PHP or WordPress symbol, for example str_contains or wp_insert_post. A short sentence is accepted when it contains the symbol.
sourceNophp reads php.net. wordpress reads developer.wordpress.org. Omit it and a wp_ symbol uses WordPress, otherwise php.net.
versionNoRelease to check, such as 8.3 or 6.7. The page is still the current manual. version_applies says whether the page version line includes this release.

Output Schema

NameRequiredDescriptionDefault
okNoFalse for not_found or fetch_failed. Those calls are not charged.
urlNoThe official page that was read.
costNo0 on a free page. 0.04 when a key was charged.
freeNoTrue when this page was one of the 5 free daily pages and no key was sent.
errorNoPresent only when ok is false. free_limit means today's 5 free pages are used and a key is required.
queryNo
titleNo
sourceNo
symbolNoThe symbol looked up on the manual.
exampleNoFirst official example, clipped to 1500 characters. Empty when the page has none.
signatureNo
introducedNoSame version line. For WordPress this is the earliest @since.
descriptionNoOfficial description, clipped to 1200 characters. User comments are excluded.
version_noteNophp.net version line, or the WordPress release that introduced the symbol.
free_remainingNoFree pages left today for this network address. Present on a free page, and 0 when error is free_limit.
version_appliesNoTrue when the requested release is covered by the version line. Null when version was omitted or the page has no version line.
credits_remainingNoPresent only after a charged, successful read with an API key.
version_requestedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedOutput schema / properties / cost
      Added value: +{
      +  "description": "0 on a free page. 0.04 when a key was charged.",
      +  "type": "number"
      +}
    • changedOutput schema / properties / credits_remaining / description
      Previous value: -"Present only after a charged, successful read."New value: +"Present only after a charged, successful read with an API key."
    • changedOutput schema / properties / error / description
      Previous value: -"Present only when ok is false."New value: +"Present only when ok is false. free_limit means today's 5 free pages are used and a key is required."
    • changedOutput schema / properties / error / enum
      Previous value: -[
      -  "not_found",
      -  "fetch_failed"
      -]New value: +[
      +  "not_found",
      +  "fetch_failed",
      +  "free_limit"
      +]
    • addedOutput schema / properties / free
      Added value: +{
      +  "description": "True when this page was one of the 5 free daily pages and no key was sent.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / free_remaining
      Added value: +{
      +  "description": "Free pages left today for this network address. Present on a free page, and 0 when error is free_limit.",
      +  "type": "number"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the readOnly/idempotent/openWorld annotations, it discloses cost and access mechanics that matter operationally: 5 free keyless pages per UTC day per network, a failed fetch does not consume a free page, and X-API-Key is required afterward at 0.04 credit per returned page. It also notes user comments are excluded. It does not describe response shape or failure payloads, but an output schema exists to carry that.

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?

Front-loaded with purpose, then returns, exclusions, pricing, and parameter guidance — a sensible order with no filler sentences. It is on the long side and the pricing/API-key block plus the signup URL could be tightened, but each part conveys actionable information for calling correctly.

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 3-parameter, non-destructive lookup tool, the description covers what is returned, which sources are consulted, what is excluded (comments, archives, other frameworks), how version checking behaves, and how access and billing work. Nothing an agent needs in order to call it correctly is missing.

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?

Schema description coverage is 100%, so the baseline is 3, but the description earns a bump by adding null semantics not present in the schema ('version_applies is null when version is omitted or the page has no version line') and clarifies that version checks applicability against the current page rather than fetching an archived version.

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?

States a specific verb and resource: 'Read one current English manual page for a PHP symbol or a WordPress function, hook, or class.' It immediately bounds scope ('current English', 'this is not an archive') and names the ecosystems it does not cover, so an agent knows exactly what it fetches without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use (a PHP symbol, a WordPress function/hook/class) and when-not ('does not search Laravel, Symfony, or Markdown docs', not an archive of older manuals). It also gives the decision rule for the ambiguous case: omit source and a wp_ name uses WordPress, otherwise php.net.

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.