Skip to main content
Glama
SunCreation

MCP Notion Server (@suncreation)

by SunCreation

notion_create_database_item

Add new pages to Notion databases by specifying database ID and property values. Supports JSON or markdown response formats for different use cases.

Instructions

Create a new item (page) in a Notion database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
database_idYesThe ID of the database to add the item to.It should be a 32-character string (excluding hyphens) formatted as 8-4-4-4-12 with hyphens (-).
propertiesYesProperties of the new database item. These should match the database schema.
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 actual handler implementation - createDatabaseItem method in NotionClientWrapper that makes a POST request to Notion's /pages endpoint to create a new database item
    async createDatabaseItem(
      database_id: string,
      properties: Record<string, any>
    ): Promise<PageResponse> {
      const body = {
        parent: { database_id },
        properties,
      };
    
      const response = await fetch(`${this.baseUrl}/pages`, {
        method: "POST",
        headers: this.headers,
        body: JSON.stringify(body),
      });
    
      return response.json();
    }
  • Tool registration - the switch case handler that routes 'notion_create_database_item' tool calls to the createDatabaseItem client method with typed arguments
    case "notion_create_database_item": {
      const args = request.params
        .arguments as unknown as args.CreateDatabaseItemArgs;
      response = await notionClient.createDatabaseItem(
        args.database_id,
        args.properties
      );
      break;
    }
  • Tool schema definition - defines the 'notion_create_database_item' tool with its name, description, and input validation schema including required database_id and properties parameters
    export const createDatabaseItemTool: Tool = {
      name: "notion_create_database_item",
      description: "Create a new item (page) in a Notion database",
      inputSchema: {
        type: "object",
        properties: {
          database_id: {
            type: "string",
            description:
              "The ID of the database to add the item to." + commonIdDescription,
          },
          properties: {
            type: "object",
            description:
              "Properties of the new database item. These should match the database schema.",
          },
          format: formatParameter,
        },
        required: ["database_id", "properties"],
      },
    };
  • TypeScript interface for the CreateDatabaseItem tool arguments, defining database_id and properties fields
    export interface CreateDatabaseItemArgs {
      database_id: string;
      properties: Record<string, any>;
      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 full burden for behavioral disclosure. While 'Create' implies a write operation, it doesn't address important behavioral aspects like authentication requirements, error conditions, rate limits, or what happens when properties don't match the database schema. The description mentions the 'format' parameter's effect on response format, but this is covered in the schema description.

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, efficient sentence that gets straight to the point with zero wasted words. It's appropriately sized for a tool with good schema documentation and is perfectly front-loaded with the core functionality.

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 creation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what happens on success (what gets returned), error conditions, or important behavioral constraints. The absence of output schema means the description should compensate by describing return values, but it doesn't.

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?

With 100% schema description coverage, the baseline is 3. The description adds no additional parameter semantics beyond what's already documented in the schema. It doesn't clarify the relationship between 'database_id' and 'properties', nor provide examples of property structures that would be helpful for a creation operation.

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 ('Create a new item') and resource ('in a Notion database'), making the purpose immediately understandable. However, it doesn't distinguish this tool from sibling 'notion_create_page' or 'notion_create_database', which could cause confusion about when to use each specific creation 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 like 'notion_create_page' or 'notion_create_database'. There's no mention of prerequisites, context, or comparison with sibling tools, leaving the agent to guess about appropriate usage scenarios.

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

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