candidate_create
Add a new candidate to the Ashby hiring pipeline by providing their name, contact details, and professional profiles for application tracking.
Instructions
Create a new candidate in Ashby.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Full name of the candidate | |
| No | Primary email address | ||
| phoneNumber | No | Phone number | |
| linkedInUrl | No | LinkedIn profile URL | |
| githubUrl | No | GitHub profile URL | |
| sourceId | No | Source ID for attribution |
Implementation Reference
- src/ashby/server.py:407-434 (handler)The generic tool handler that dispatches 'candidate_create' to the appropriate Ashby API endpoint using the TOOL_ENDPOINT_MAP.
@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))] except requests.exceptions.HTTPError as e: error_body = "" if e.response is not None: try: error_body = e.response.text except Exception: pass return [ types.TextContent( type="text", text=f"Ashby API error on {endpoint}: {e}\n{error_body}", ) ] except Exception as e: return [types.TextContent(type="text", text=f"Error calling {endpoint}: {e}")] - src/ashby/server.py:145-160 (schema)The tool schema definition for 'candidate_create'.
types.Tool( name="candidate_create", description="Create a new candidate in Ashby.", inputSchema={ "type": "object", "properties": { "name": {"type": "string", "description": "Full name of the candidate"}, "email": {"type": "string", "description": "Primary email address"}, "phoneNumber": {"type": "string", "description": "Phone number"}, "linkedInUrl": {"type": "string", "description": "LinkedIn profile URL"}, "githubUrl": {"type": "string", "description": "GitHub profile URL"}, "sourceId": {"type": "string", "description": "Source ID for attribution"}, }, "required": ["name"], }, ), - src/ashby/server.py:381-381 (registration)Registration of the 'candidate_create' tool mapping it to the '/candidate.create' API endpoint.
"candidate_create": "/candidate.create",