application_create
Create an application to link a candidate to a job in the Ashby hiring pipeline. Specify candidate and job IDs to initiate the application process.
Instructions
Create an application linking a candidate to a job.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| candidateId | Yes | The candidate ID | |
| jobId | Yes | The job ID | |
| sourceId | No | Source ID for attribution | |
| interviewPlanId | No | Interview plan to use (optional) |
Implementation Reference
- src/ashby/server.py:407-434 (handler)The handle_call_tool function acts as a generic handler for all registered tools, routing the call to the appropriate Ashby API endpoint defined in 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:246-259 (schema)The Tool definition for application_create, including its input schema.
types.Tool( name="application_create", description="Create an application linking a candidate to a job.", inputSchema={ "type": "object", "properties": { "candidateId": {"type": "string", "description": "The candidate ID"}, "jobId": {"type": "string", "description": "The job ID"}, "sourceId": {"type": "string", "description": "Source ID for attribution"}, "interviewPlanId": {"type": "string", "description": "Interview plan to use (optional)"}, }, "required": ["candidateId", "jobId"], }, ), - src/ashby/server.py:388-388 (registration)Registration of the application_create tool mapping to the Ashby API endpoint /application.create.
"application_create": "/application.create",