delete_question
Remove a prediction question from Fatebook to manage your forecast history. Specify the question ID to delete it from the tracking platform.
Instructions
Delete a Fatebook question
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| questionId | Yes | ||
| apiKey | No |
Implementation Reference
- main.py:334-361 (handler)Primary handler implementation for the 'delete_question' MCP tool. Decorated with @mcp.tool() for automatic registration and schema inference. Makes DELETE request to Fatebook API endpoint.@mcp.tool() async def delete_question(ctx: Context, questionId: str, apiKey: str = "") -> bool: """Delete a Fatebook question""" api_key = apiKey or os.getenv("FATEBOOK_API_KEY") if not api_key: await ctx.error("API key is required but not provided") raise ValueError( "API key is required (provide as parameter or set FATEBOOK_API_KEY environment variable)" ) params = {"questionId": questionId, "apiKey": api_key} try: async with httpx.AsyncClient() as client: response = await client.delete( "https://fatebook.io/api/v0/deleteQuestion", params=params ) response.raise_for_status() return True except httpx.HTTPError as e: await ctx.error(f"HTTP error occurred: {e}") raise except Exception as e: await ctx.error(f"Unexpected error occurred: {e}") raise
- src/fatebook_mcp/__main__.py:311-335 (handler)Alternative handler implementation for the 'delete_question' tool in the package __main__.py file. Similar logic but lacks Context parameter and detailed logging.@mcp.tool() async def delete_question(questionId: str, apiKey: str = "") -> bool: """Delete a Fatebook question""" api_key = apiKey or os.getenv("FATEBOOK_API_KEY") if not api_key: raise ValueError( "API key is required (provide as parameter or set FATEBOOK_API_KEY environment variable)" ) params = {"questionId": questionId, "apiKey": api_key} try: async with httpx.AsyncClient() as client: response = await client.delete( "https://fatebook.io/api/v0/deleteQuestion", params=params ) response.raise_for_status() return True except httpx.HTTPError: raise except Exception: raise
- main.py:334-334 (registration)The @mcp.tool() decorator registers the delete_question function as an MCP tool, inferring input/output schemas from type annotations.@mcp.tool()
- src/fatebook_mcp/__main__.py:311-311 (registration)The @mcp.tool() decorator registers the function in the package version.@mcp.tool()