Skip to main content
Glama
awkoy

notion-mcp-server

retrieve_block

Fetch a specific block from Notion by its unique ID, enabling integration with AI assistants and efficient data retrieval for automation workflows.

Instructions

Retrieve a block from Notion by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blockIdYesThe ID of the block to retrieve

Implementation Reference

  • The main handler function for the 'retrieve_block' tool. It retrieves a specific Notion block by its ID using the Notion API and returns the block data as a formatted text response.
    export const retrieveBlock = async (
      params: RetrieveBlockParams
    ): Promise<CallToolResult> => {
      try {
        const response = await notion.blocks.retrieve({
          block_id: params.blockId,
        });
    
        return {
          content: [
            {
              type: "text",
              text: "Block retrieved successfully! Note: If this block has children, use the retrieve_block_children endpoint to get the list of child blocks.",
            },
            {
              type: "text",
              text: JSON.stringify(response, null, 2),
            },
          ],
        };
      } catch (error) {
        return handleNotionError(error);
      }
    };
  • Zod schema defining the input parameters for the retrieve_block action: requires a blockId string.
    export const RETRIEVE_BLOCK_SCHEMA = {
      blockId: z.string().describe("The ID of the block to retrieve"),
    };
  • Dispatch registration in the blocks operation handler: maps the 'retrieve_block' action to the retrieveBlock function.
    case "retrieve_block":
      return retrieveBlock(params.payload.params);
  • MCP tool registration for 'notion_blocks', which includes the 'retrieve_block' action via BLOCKS_OPERATION_SCHEMA and registerBlocksOperationTool handler.
    // Register combined blocks operation tool
    server.tool(
      "notion_blocks",
      "Perform various block operations (retrieve, update, delete, append children, batch operations)",
      BLOCKS_OPERATION_SCHEMA,
      registerBlocksOperationTool
    );
  • Definition of the 'retrieve_block' action within the BLOCKS_OPERATION_SCHEMA discriminated union.
    z.object({
      action: z
        .literal("retrieve_block")
        .describe("Use this action to retrieve a block."),
      params: z.object(RETRIEVE_BLOCK_SCHEMA),
    }),
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal information. It states the tool retrieves a block but doesn't cover aspects like authentication requirements, rate limits, error handling, or what the return format looks like (e.g., JSON structure). This leaves significant gaps for a tool that likely involves API calls.

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, direct sentence with zero waste—it states exactly what the tool does without unnecessary words. It's front-loaded and efficiently communicates the core purpose, making it easy for an agent to parse quickly.

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 for a retrieval tool. It doesn't explain what a 'block' entails in Notion context, what data is returned, or any behavioral traits like pagination or errors. This leaves the agent with insufficient context to use the tool effectively beyond basic invocation.

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 'blockId' clearly documented as 'The ID of the block to retrieve'. The description adds no additional parameter details beyond what the schema provides, such as ID format examples or constraints, so it meets the baseline for high schema coverage without extra value.

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 action ('Retrieve') and resource ('a block from Notion by ID'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'retrieve_block_children' or 'search_pages', which also retrieve Notion content but with different scopes or methods.

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 like needing a valid block ID, nor does it compare to siblings such as 'retrieve_block_children' for child blocks or 'search_pages' for broader searches, 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

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

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