Skip to main content
Glama

notion_create_database

Create a database in Notion to organize and structure information with customizable properties and rich text formatting.

Instructions

Create a database in Notion

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
parentYesParent object of the database
titleNoTitle of database as it appears in Notion. An array of rich text objects.
propertiesYesProperty schema of database. The keys are the names of properties as they appear in Notion and the values are property schema objects.
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 core handler function in NotionClientWrapper that executes the tool by sending a POST request to Notion's /databases endpoint with parent, properties, and optional title.
    async createDatabase(
      parent: CreateDatabaseArgs["parent"],
      properties: Record<string, any>,
      title?: RichTextItemResponse[]
    ): Promise<DatabaseResponse> {
      const body = { parent, title, properties };
    
      const response = await fetch(`${this.baseUrl}/databases`, {
        method: "POST",
        headers: this.headers,
        body: JSON.stringify(body),
      });
    
      return response.json();
    }
  • Input schema definition for the notion_create_database tool, defining parameters like parent, title, properties.
    export const createDatabaseTool: Tool = {
      name: "notion_create_database",
      description: "Create a database in Notion",
      inputSchema: {
        type: "object",
        properties: {
          parent: {
            type: "object",
            description: "Parent object of the database",
          },
          title: {
            type: "array",
            description:
              "Title of database as it appears in Notion. An array of rich text objects.",
            items: richTextObjectSchema,
          },
          properties: {
            type: "object",
            description:
              "Property schema of database. The keys are the names of properties as they appear in Notion and the values are property schema objects.",
          },
          format: formatParameter,
        },
        required: ["parent", "properties"],
      },
    };
  • Registration and dispatch in the CallToolRequest handler switch statement, casting args and calling the client handler.
    case "notion_create_database": {
      const args = request.params
        .arguments as unknown as args.CreateDatabaseArgs;
      response = await notionClient.createDatabase(
        args.parent,
        args.properties,
        args.title
      );
      break;
    }
  • Tool is registered by including createDatabaseTool in the list returned by ListToolsRequest handler.
    schemas.createDatabaseTool,
  • TypeScript interface defining the arguments for createDatabase, used for type casting in the handler.
    export interface CreateDatabaseArgs {
      parent: {
        type: string;
        page_id?: string;
        database_id?: string;
        workspace?: boolean;
      };
      title?: RichTextItemResponse[];
      properties: Record<string, any>;
      format?: "json" | "markdown";
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.8/5.0
Behavior2/5

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

No annotations are present, so the description carries full burden for behavioral disclosure. It only states the purpose without revealing what the tool returns, side effects, required authentication, or constraints. The minimal text adds no transparency beyond the bare action.

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

Conciseness3/5

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

The description is extremely concise (one sentence), which is appropriate but does not earn its place because it adds little to no value beyond the tool name. It could include critical usage context without becoming verbose.

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 tool's complexity (4 parameters, nested objects, no output schema), the description is incomplete. It lacks information about return values, error scenarios, or how the database creation interacts with Notion's hierarchy. The schema covers parameter details, but the description should provide operational context.

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?

Schema description coverage is 100%, so the baseline is 3. The description itself adds no parameter-level information; all semantics are already in the input schema. The description does not enhance understanding of parameters beyond what the schema provides.

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 'Create a database in Notion' clearly states the action (create) and resource (database), but does not distinguish it from sibling tools like notion_create_database_item or notion_create_comment, which also create entities. The verb+resource is specific, but differentiation is missing.

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?

No usage guidelines are provided. The description does not indicate when to use this tool over alternatives (e.g., notion_update_database or notion_create_database_item), nor does it mention prerequisites like the parent being a page or existing database.

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