Skip to main content
Glama

API-get-background-result

Fetch the result of a background-processed Notion page using its page ID. Designed for the Notion ReadOnly MCP Server to enable efficient retrieval of processed data.

Instructions

Retrieve the result of a background processing request

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
page_idYesIdentifier for the Notion page that was processed in background

Implementation Reference

  • Registers the 'API-get-background-result' tool in the list tools handler, defining its input schema.
    const backgroundResultTool = { name: 'API-get-background-result', description: 'Retrieve the result of a background processing request', inputSchema: { type: 'object', properties: { page_id: { type: 'string', description: 'Identifier for the Notion page that was processed in background', }, }, required: ['page_id'], } as Tool['inputSchema'], }; tools.push(backgroundResultTool); console.log(`- ${backgroundResultTool.name}: ${backgroundResultTool.description}`);
  • Executes the tool logic by retrieving the background result using getBackgroundProcessingResult and returning it as JSON text content.
    // Handle background result retrieval if (name === 'API-get-background-result') { const result = this.getBackgroundProcessingResult(params?.page_id as string); return { content: [ { type: 'text', text: JSON.stringify(result), }, ], }; }
  • Helper method that fetches the stored background processing result for the given page ID from the internal Map, or returns a not_found message.
    public getBackgroundProcessingResult(pageId: string): any { return this.backgroundProcessingResults.get(pageId) || { status: 'not_found', message: `No background processing result found for page ${pageId}` }; }
  • Helper method that stores the background processing result in the internal Map for later retrieval.
    private storeBackgroundProcessingResult(pageId: string, result: any): void { this.backgroundProcessingResults.set(pageId, result); }

Other Tools

Related Tools

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/Taewoong1378/notion-readonly-mcp-server'

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