Skip to main content
Glama

notion_retrieve_block_children

Retrieve child content from Notion blocks to access nested information, supporting pagination and format options for reading or editing.

Instructions

Retrieve the children of a block

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
block_idYesThe ID of the block.It should be a 32-character string (excluding hyphens) formatted as 8-4-4-4-12 with hyphens (-).
start_cursorNoPagination cursor for next page of results
page_sizeNoNumber of results per page (max 100)
formatNoSpecify the response format. 'json' returns the original data structure, 'markdown' returns a more readable format. Use 'markdown' when the user only needs to read the page and isn't planning to write or modify it. Use 'json' when the user needs to read the page with the intention of writing to or modifying it.markdown

Implementation Reference

  • The main handler function in NotionClientWrapper that performs the actual Notion API call to retrieve block children using GET /blocks/{block_id}/children with optional pagination.
    async retrieveBlockChildren(
      block_id: string,
      start_cursor?: string,
      page_size?: number
    ): Promise<ListResponse> {
      const params = new URLSearchParams();
      if (start_cursor) params.append("start_cursor", start_cursor);
      if (page_size) params.append("page_size", page_size.toString());
    
      const response = await fetch(
        `${this.baseUrl}/blocks/${block_id}/children?${params}`,
        {
          method: "GET",
          headers: this.headers,
        }
      );
    
      return response.json();
    }
  • Tool schema defining the input schema, name, and description for the notion_retrieve_block_children tool.
    export const retrieveBlockChildrenTool: Tool = {
      name: "notion_retrieve_block_children",
      description: "Retrieve the children of a block",
      inputSchema: {
        type: "object",
        properties: {
          block_id: {
            type: "string",
            description: "The ID of the block." + commonIdDescription,
          },
          start_cursor: {
            type: "string",
            description: "Pagination cursor for next page of results",
          },
          page_size: {
            type: "number",
            description: "Number of results per page (max 100)",
          },
          format: formatParameter,
        },
        required: ["block_id"],
      },
    };
  • Registration of the tool in the ListToolsRequestHandler by including it in the allTools array.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      const allTools = [
        schemas.appendBlockChildrenTool,
        schemas.retrieveBlockTool,
        schemas.retrieveBlockChildrenTool,
        schemas.deleteBlockTool,
        schemas.updateBlockTool,
        schemas.retrievePageTool,
        schemas.updatePagePropertiesTool,
        schemas.listAllUsersTool,
        schemas.retrieveUserTool,
        schemas.retrieveBotUserTool,
        schemas.createDatabaseTool,
        schemas.queryDatabaseTool,
        schemas.retrieveDatabaseTool,
        schemas.updateDatabaseTool,
        schemas.createDatabaseItemTool,
        schemas.createCommentTool,
        schemas.retrieveCommentsTool,
        schemas.searchTool,
      ];
      return {
        tools: filterTools(allTools, enabledToolsSet),
      };
    });
  • Dispatch handler case in the MCP CallToolRequest handler that validates arguments and delegates to the NotionClientWrapper.retrieveBlockChildren method.
    case "notion_retrieve_block_children": {
      const args = request.params
        .arguments as unknown as args.RetrieveBlockChildrenArgs;
      if (!args.block_id) {
        throw new Error("Missing required argument: block_id");
      }
      response = await notionClient.retrieveBlockChildren(
        args.block_id,
        args.start_cursor,
        args.page_size
      );
      break;
  • TypeScript interface defining the argument types for the tool, used for type casting in the handler.
    export interface RetrieveBlockChildrenArgs {
      block_id: string;
      start_cursor?: string;
      page_size?: number;
      format?: "json" | "markdown";
    }
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. While 'retrieve' implies a read operation, the description doesn't mention important behavioral aspects like pagination behavior (implied by parameters but not explained), rate limits, authentication requirements, or what happens with invalid block IDs. The description is too minimal for a tool with 4 parameters and no annotation coverage.

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 extremely concise at just 5 words, making it easy to parse quickly. It's front-loaded with the core purpose and contains no unnecessary verbiage. Every word serves a purpose in communicating the tool's basic function.

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?

For a tool with 4 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what 'children of a block' means in the Notion context, what format the results come in, or provide any behavioral context. The agent would need to rely heavily on the schema alone, which is insufficient for understanding the tool's full behavior and appropriate usage.

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 description provides no parameter information beyond what's already in the schema, which has 100% coverage. The schema thoroughly documents all 4 parameters including block_id format, pagination controls, and format options with clear usage guidance. The description adds no additional semantic value, so the baseline score of 3 is appropriate.

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 ('children of a block'), making the purpose immediately understandable. However, it doesn't differentiate this tool from similar siblings like 'notion_retrieve_block' or 'notion_retrieve_page', which could cause confusion about when to use each retrieval tool.

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. With multiple retrieval tools in the sibling list (notion_retrieve_block, notion_retrieve_page, notion_retrieve_database, etc.), there's no indication of what distinguishes retrieving block children from retrieving other Notion entities or when this specific retrieval operation is appropriate.

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

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