Skip to main content
Glama

archive_reason_list

Retrieve available archive reasons to properly move candidate applications to the Archived stage in the hiring pipeline.

Instructions

List all archive reasons (needed for application_change_stage to Archived).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The `handle_call_tool` function serves as the central handler for all registered MCP tools. It uses the `TOOL_ENDPOINT_MAP` to map the tool name "archive_reason_list" to the Ashby API endpoint "/archiveReason.list" and executes the request via 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}")]
  • Tool definition for "archive_reason_list" including its description and empty input schema.
        name="archive_reason_list",
        description="List all archive reasons (needed for application_change_stage to Archived).",
        inputSchema={
            "type": "object",
            "properties": {},
        },
    ),
  • Registration mapping from the tool name "archive_reason_list" to the API endpoint path.
    "archive_reason_list": "/archiveReason.list",

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PlenishAI/mcp-ashby'

If you have feedback or need assistance with the MCP directory API, please join our Discord server