Read a PHP or WordPress manual page
query_php_docsRead 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
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | A PHP or WordPress symbol, for example str_contains or wp_insert_post. A short sentence is accepted when it contains the symbol. | |
| source | No | php reads php.net. wordpress reads developer.wordpress.org. Omit it and a wp_ symbol uses WordPress, otherwise php.net. | |
| version | No | Release 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
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | False for not_found or fetch_failed. Those calls are not charged. | |
| url | No | The official page that was read. | |
| cost | No | 0 on a free page. 0.04 when a key was charged. | |
| free | No | True when this page was one of the 5 free daily pages and no key was sent. | |
| error | No | Present only when ok is false. free_limit means today's 5 free pages are used and a key is required. | |
| query | No | ||
| title | No | ||
| source | No | ||
| symbol | No | The symbol looked up on the manual. | |
| example | No | First official example, clipped to 1500 characters. Empty when the page has none. | |
| signature | No | ||
| introduced | No | Same version line. For WordPress this is the earliest @since. | |
| description | No | Official description, clipped to 1200 characters. User comments are excluded. | |
| version_note | No | php.net version line, or the WordPress release that introduced the symbol. | |
| free_remaining | No | Free pages left today for this network address. Present on a free page, and 0 when error is free_limit. | |
| version_applies | No | True when the requested release is covered by the version line. Null when version was omitted or the page has no version line. | |
| credits_remaining | No | Present only after a charged, successful read with an API key. | |
| version_requested | No |