candidate_add_tag
Add tags to candidate profiles in Ashby ATS to organize and categorize applicants for better hiring pipeline management.
Instructions
Add a tag to a candidate. Use candidate_tag_list to find tag IDs.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| candidateId | Yes | The candidate ID | |
| tagId | Yes | The tag ID to add |
Implementation Reference
- src/ashby/server.py:407-434 (handler)The handler for all tools, including candidate_add_tag, routes requests to the configured Ashby API endpoint using the AshbyClient.
@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:190-201 (schema)Definition and schema for the candidate_add_tag tool.
types.Tool( name="candidate_add_tag", description="Add a tag to a candidate. Use candidate_tag_list to find tag IDs.", inputSchema={ "type": "object", "properties": { "candidateId": {"type": "string", "description": "The candidate ID"}, "tagId": {"type": "string", "description": "The tag ID to add"}, }, "required": ["candidateId", "tagId"], }, ), - src/ashby/server.py:384-384 (registration)Registration of candidate_add_tag in the TOOL_ENDPOINT_MAP.
"candidate_add_tag": "/candidate.addTag",