Skip to main content
Glama

API-get-background-result

Retrieve processed Notion page results from background operations to access completed data without waiting.

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 tools list provided to MCP, including description and input schema requiring 'page_id'.
    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}`);
  • Tool call handler within MCP's CallToolRequestHandler that invokes getBackgroundProcessingResult and returns the result 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),
          },
        ],
      };
    }
  • Executes the core logic of the tool by fetching the stored background result from the in-memory Map or returning 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}`
      };
    }
  • In-memory storage Map for background processing results, used by the tool handler.
    private backgroundProcessingResults: Map<string, any> = new Map()
  • Helper method to store background processing results in the Map, called after background processing completes.
      this.backgroundProcessingResults.set(pageId, result);
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states this is a retrieval operation, implying it's likely read-only, but doesn't clarify authentication needs, rate limits, error conditions, or what happens if the background processing isn't complete. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with zero waste. It's appropriately sized and front-loaded, efficiently conveying the core purpose without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the result contains (e.g., status, data, errors), how to handle pending processing, or any dependencies. For a tool that retrieves background processing results, this leaves critical context gaps for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the single parameter 'page_id' documented as 'Identifier for the Notion page that was processed in background'. The description adds no additional meaning beyond this, such as format examples or constraints, so it meets the baseline of 3 where the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Retrieve') and resource ('result of a background processing request'), making the purpose understandable. However, it doesn't differentiate this tool from its siblings (like API-retrieve-a-page or API-retrieve-a-database), which also retrieve data but for different resources.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., that a background processing request must have been initiated first) or compare it to sibling tools that retrieve other types of data, leaving the agent to infer usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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