update_employee
Modify employee records by updating name, age, or other details using the MCP Employee API Server's REST API. This tool allows AI assistants to change existing employee information.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| name | Yes | ||
| age | Yes |
Implementation Reference
- main.py:64-71 (handler)The handler function for the 'update_employee' tool. It is registered via the @mcp.tool() decorator and performs a PUT request to update an employee's name and age by ID using the shared make_request helper.@mcp.tool() async def update_employee(id: int, name: str, age: int) -> dict: url = f"{URL_BASE}/employees/{id}" response = await make_request(url, "PUT", { "name": name, "age": age }) return response