candidate_list
Retrieve candidate profiles from Ashby ATS with pagination to browse and manage hiring pipeline data.
Instructions
List all candidates with cursor pagination.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max results per page (default/max 100) | |
| cursor | No | Cursor for next page |
Implementation Reference
- src/ashby/server.py:407-418 (handler)The handle_call_tool function serves as the central handler for all tools, including 'candidate_list'. It maps the tool name to an Ashby API endpoint via TOOL_ENDPOINT_MAP and executes the request.
@server.call_tool() async def handle_call_tool(name: str, arguments: dict[str, Any]) -> list[types.TextContent]: """Route tool calls to the correct Ashby endpoint, passing arguments directly.""" endpoint = TOOL_ENDPOINT_MAP.get(name) if not endpoint: return [types.TextContent(type="text", text=f"Unknown tool: {name}")] try: # Pass arguments straight through -- tool schemas already use Ashby's # camelCase param names so no translation is needed. response = ashby.post(endpoint, data=arguments if arguments else None) return [types.TextContent(type="text", text=json.dumps(response, indent=2))] - src/ashby/server.py:112-122 (schema)Registration and input schema definition for the 'candidate_list' tool.
types.Tool( name="candidate_list", description="List all candidates with cursor pagination.", inputSchema={ "type": "object", "properties": { "limit": {"type": "integer", "description": "Max results per page (default/max 100)"}, "cursor": {"type": "string", "description": "Cursor for next page"}, }, }, ), - src/ashby/server.py:374-378 (registration)Definition of the mapping between the 'candidate_list' tool name and the underlying Ashby API endpoint (/candidate.list).
TOOL_ENDPOINT_MAP = { "job_list": "/job.list", "job_info": "/job.info", "job_search": "/job.search", "candidate_list": "/candidate.list",