Skip to main content
Glama

create-database

Create a new Notion database with a specified title, properties, and optional icon or cover. Assign it to a parent page for organized workspace management.

Instructions

Create a new database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coverNoOptional cover for the database
iconNoOptional icon for the database
parent_idYesID of the parent page
propertiesYesDatabase properties schema
titleYesDatabase title as rich text array

Implementation Reference

  • Handler implementation for the 'create-database' tool that creates a new Notion database using the notion.databases.create API.
    else if (name === "create-database") {
      let { parent_id, title, properties, icon, cover } = args;
      
      // Remove dashes if present in parent_id
      parent_id = parent_id.replace(/-/g, "");
    
      const databaseParams = {
        parent: {
          type: "page_id",
          page_id: parent_id,
        },
        title,
        properties,
      };
    
      // Set default emoji if icon is specified but emoji is empty
      if (icon && icon.type === "emoji" && !icon.emoji) {
        icon.emoji = "📄"; // Default document emoji
        databaseParams.icon = icon;
      } else if (icon) {
        databaseParams.icon = icon;
      }
    
      if (cover) {
        databaseParams.cover = cover;
      }
    
      const response = await notion.databases.create(databaseParams);
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(response, null, 2),
          },
        ],
      };
    }
  • Input schema definition for the 'create-database' tool, specifying parameters like parent_id, title, properties, icon, and cover.
    inputSchema: {
      type: "object",
      properties: {
        parent_id: {
          type: "string",
          description: "ID of the parent page"
        },
        title: {
          type: "array",
          description: "Database title as rich text array"
        },
        properties: {
          type: "object",
          description: "Database properties schema"
        },
        icon: {
          type: "object",
          description: "Optional icon for the database"
        },
        cover: {
          type: "object",
          description: "Optional cover for the database"
        }
      },
      required: ["parent_id", "title", "properties"]
    }
  • server.js:125-154 (registration)
    Registration of the 'create-database' tool in the tools/list endpoint response, providing name, description, and input schema.
    {
      name: "create-database",
      description: "Create a new database",
      inputSchema: {
        type: "object",
        properties: {
          parent_id: {
            type: "string",
            description: "ID of the parent page"
          },
          title: {
            type: "array",
            description: "Database title as rich text array"
          },
          properties: {
            type: "object",
            description: "Database properties schema"
          },
          icon: {
            type: "object",
            description: "Optional icon for the database"
          },
          cover: {
            type: "object",
            description: "Optional cover for the database"
          }
        },
        required: ["parent_id", "title", "properties"]
      }
    },
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. 'Create a new database' implies a write/mutation operation but provides no information about permissions required, whether the operation is idempotent, what happens on failure, or what the response contains. For a creation tool with zero annotation coverage, this is a significant gap.

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 maximally concise - a single four-word sentence that communicates the essential purpose. There's zero wasted language, and the structure is front-loaded with the core action. Every word earns its place in this minimal but complete statement of 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 database creation tool with 5 parameters (3 required), no annotations, and no output schema, the description is inadequate. It doesn't explain what constitutes a successful creation, what gets returned, error conditions, or how this differs from page creation. The agent lacks critical context needed to use this tool effectively.

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 input schema already documents all 5 parameters thoroughly. The description adds no parameter information beyond what's in the schema - it doesn't explain relationships between parameters, provide examples, or clarify usage patterns. The baseline of 3 is appropriate when the schema does all the parameter documentation work.

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') and resource ('a new database'), making the purpose immediately understandable. It distinguishes from siblings like 'list-databases' or 'update-database' by specifying creation rather than listing or modifying. However, it doesn't explicitly differentiate from 'create-page' which creates a different resource type.

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. There's no mention of prerequisites, when to choose this over 'create-page', or any context about database creation requirements. The agent must infer usage from the tool name alone.

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/emmanuelsystems/mcpnotionslack'

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