Skip to main content
Glama

notion_update_database

Modify Notion database properties, titles, and descriptions 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

  • MCP tool handler: switch case that extracts arguments and invokes the NotionClientWrapper.updateDatabase method to perform the update.
    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;
    }
  • Input schema and Tool definition for the notion_update_database tool.
    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"],
      },
    };
  • Core implementation in NotionClientWrapper: constructs PATCH request body and calls Notion API to update database title, description, or 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 registration: includes updateDatabaseTool in the list of available tools served in ListToolsRequest response.
    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),
      };
    });
  • TypeScript interface defining the input arguments for the updateDatabase tool.
    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 full burden but offers minimal behavioral insight. It states it's an update operation (implying mutation) but doesn't disclose permissions needed, whether changes are reversible, rate limits, error conditions, or what happens to unspecified properties. This is inadequate for a mutation tool with zero 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 a single, efficient sentence with zero waste. It's appropriately sized for such a minimal statement, though the minimalism contributes to low scores in other dimensions. Every word earns its place.

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 (5 parameters with nested objects, mutation operation) and lack of annotations or output schema, the description is severely incomplete. It doesn't explain what 'updating' entails, what fields are updatable beyond what's implied by parameters, or provide any context about Notion's database update semantics. This leaves significant gaps for an AI agent.

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 schema fully documents all 5 parameters. The description adds no additional meaning about parameters beyond the generic 'update' context. 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' states the basic action (update) and resource (database), but it's vague about what specifically can be updated. It doesn't distinguish from sibling tools like notion_update_block or notion_update_page_properties, which also perform updates on different Notion resources.

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 guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., needing a database ID), when not to use it (e.g., for creating vs. updating), or refer to sibling tools like notion_create_database or notion_retrieve_database for related operations.

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

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