Skip to main content
Glama

notion_update_database

Modify database title, description, or properties in Notion to keep information current and organized.

Instructions

Update a database in Notion

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
database_idYesThe ID of the database to update.It should be a 32-character string (excluding hyphens) formatted as 8-4-4-4-12 with hyphens (-).
titleNoAn array of rich text objects that represents the title of the database that is displayed in the Notion UI.
descriptionNoAn array of rich text objects that represents the description of the database that is displayed in the Notion UI.
propertiesNoThe properties of a database to be changed in the request, in the form of a JSON object.
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

  • Core implementation of the updateDatabase method in NotionClientWrapper, performing the PATCH request to Notion API /databases/{database_id} with optional title, description, and properties.
    async updateDatabase(
      database_id: string,
      title?: RichTextItemResponse[],
      description?: RichTextItemResponse[],
      properties?: Record<string, any>
    ): Promise<DatabaseResponse> {
      const body: Record<string, any> = {};
      if (title) body.title = title;
      if (description) body.description = description;
      if (properties) body.properties = properties;
    
      const response = await fetch(`${this.baseUrl}/databases/${database_id}`, {
        method: "PATCH",
        headers: this.headers,
        body: JSON.stringify(body),
      });
    
      return response.json();
    }
  • Tool schema definition for 'notion_update_database', specifying input schema, description, and parameters.
    export const updateDatabaseTool: Tool = {
      name: "notion_update_database",
      description: "Update a database in Notion",
      inputSchema: {
        type: "object",
        properties: {
          database_id: {
            type: "string",
            description: "The ID of the database to update." + commonIdDescription,
          },
          title: {
            type: "array",
            description:
              "An array of rich text objects that represents the title of the database that is displayed in the Notion UI.",
            items: richTextObjectSchema,
          },
          description: {
            type: "array",
            description:
              "An array of rich text objects that represents the description of the database that is displayed in the Notion UI.",
            items: richTextObjectSchema,
          },
          properties: {
            type: "object",
            description:
              "The properties of a database to be changed in the request, in the form of a JSON object.",
          },
          format: formatParameter,
        },
        required: ["database_id"],
      },
    };
  • Registration of the notion_update_database tool (as updateDatabaseTool) in the list of available tools returned by ListToolsRequestHandler.
      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 in CallToolRequestHandler switch statement that casts arguments and invokes the client updateDatabase method.
    case "notion_update_database": {
      const args = request.params
        .arguments as unknown as args.UpdateDatabaseArgs;
      response = await notionClient.updateDatabase(
        args.database_id,
        args.title,
        args.description,
        args.properties
      );
      break;
    }
  • TypeScript interface defining the arguments for the notion_update_database tool, used for type casting in the handler.
    export interface UpdateDatabaseArgs {
      database_id: string;
      title?: RichTextItemResponse[];
      description?: RichTextItemResponse[];
      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 the full burden of behavioral disclosure. 'Update a database in Notion' implies a mutation operation but provides no information about permissions required, whether changes are reversible, rate limits, error conditions, or what happens to existing database properties not mentioned in the update. For a complex mutation tool with 5 parameters and nested objects, this is a significant gap in behavioral context.

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: 'Update a database in Notion.' It's front-loaded with the core action and resource, with zero wasted words. While it may be too brief for adequate completeness, as a standalone statement it's perfectly structured and efficient.

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 complexity (5 parameters with nested objects, no annotations, no output schema), the description is inadequate. A database update tool in Notion involves significant complexity with rich text objects, property schemas, and format options. The single-sentence description fails to provide necessary context about what can be updated, how updates affect existing data, or what the tool returns. For a mutation tool of this complexity, more guidance is needed.

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 with detailed descriptions of database_id, title, description, properties, and format. The description adds no parameter information beyond what's in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Update a database in Notion' clearly states the verb ('Update') and resource ('database in Notion'), making the basic purpose understandable. However, it's quite generic and doesn't differentiate from sibling tools like notion_update_block or notion_update_page_properties, which also perform updates on different Notion resources. It lacks specificity about what aspects of a database can be updated.

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 are multiple sibling update tools (notion_update_block, notion_update_page_properties) and related tools like notion_retrieve_database, but the description offers no context about when this specific database update tool is appropriate versus those others. 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

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