Search the Hammerspoon API
hs_api_searchSearch Hammerspoon's API documentation for exact signatures of functions, methods, constants, and modules. Verify names before writing Lua to avoid runtime errors.
Instructions
Search Hammerspoon's own API documentation for functions, methods, constants, and modules. Returns exact signatures. Use this before writing Lua so calls are correct the first time, rather than discovering a wrong name from a runtime error.
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": "hs_api_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of results. | |
| query | Yes | What to look for. A qualified name like "hs.window.setFrame", a bare name like "setFrame", or words to match against summaries like "screen frame". | |
| module | No | Restrict results to modules whose name contains this, for example "window". |