firecrawl_check_crawl_status
Monitor the progress and retrieve results of web crawling jobs initiated through the Firecrawl MCP Server, providing real-time status updates on content extraction tasks.
Instructions
Check the status of a crawl job.
Usage Example:
{
"name": "firecrawl_check_crawl_status",
"arguments": {
"id": "550e8400-e29b-41d4-a716-446655440000"
}
}
Returns: Status and progress of the crawl job, including results if available.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes |
Implementation Reference
- src/index.ts:523-548 (registration)Registration of the 'firecrawl_check_crawl_status' tool using FastMCP's server.addTool method, including name, description, parameters schema, and execute handler.server.addTool({ name: 'firecrawl_check_crawl_status', description: ` Check the status of a crawl job. **Usage Example:** \`\`\`json { "name": "firecrawl_check_crawl_status", "arguments": { "id": "550e8400-e29b-41d4-a716-446655440000" } } \`\`\` **Returns:** Status and progress of the crawl job, including results if available. `, parameters: z.object({ id: z.string() }), execute: async ( args: unknown, { session }: { session?: SessionData } ): Promise<string> => { const client = getClient(session); const res = await client.getCrawlStatus((args as any).id as string); return asText(res); }, });
- src/index.ts:540-547 (handler)The handler function that executes the tool: retrieves the Firecrawl client from session, calls getCrawlStatus with the provided ID, and returns the stringified response.execute: async ( args: unknown, { session }: { session?: SessionData } ): Promise<string> => { const client = getClient(session); const res = await client.getCrawlStatus((args as any).id as string); return asText(res); },
- src/index.ts:539-539 (schema)Zod schema defining the input parameters for the tool: a single 'id' string.parameters: z.object({ id: z.string() }),
- src/index.ts:164-166 (helper)Helper function to stringify data to formatted JSON, used in the tool's response.function asText(data: unknown): string { return JSON.stringify(data, null, 2); }
- src/index.ts:142-162 (helper)Helper function to create and return a FirecrawlApp client instance, handling authentication based on environment and session.function getClient(session?: SessionData): FirecrawlApp { // For cloud service, API key is required if (process.env.CLOUD_SERVICE === 'true') { if (!session || !session.firecrawlApiKey) { throw new Error('Unauthorized'); } return createClient(session.firecrawlApiKey); } // For self-hosted instances, API key is optional if FIRECRAWL_API_URL is provided if ( !process.env.FIRECRAWL_API_URL && (!session || !session.firecrawlApiKey) ) { throw new Error( 'Unauthorized: API key is required when not using a self-hosted instance' ); } return createClient(session?.firecrawlApiKey); }