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";
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.4/5.0
Behavior1/5

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

No annotations are present, and the description is just 'Update a database in Notion'. It discloses no behavioral traits such as side effects, permissions required, or rate limits. With no annotations, the description carries the full burden but provides virtually no useful 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.

Conciseness3/5

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

The description is very concise at one sentence, which is not wasteful. However, it is minimal and could include more useful information without being verbose. The brevity hinders rather than helps, as it misses key context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is severely incomplete given the tool's complexity (5 parameters, nested objects, no output schema). It fails to mention that title, description, and properties can be updated, or explain the 'format' parameter's role. The agent must rely entirely on the schema, which is insufficient for complete understanding.

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?

The input schema has 100% description coverage, so the baseline is 3. The tool description itself adds no extra meaning beyond what the schema already provides. It does not explain parameter relationships or usage nuances, but the schema is thorough, so a baseline score is appropriate.

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 'Update a database in Notion' clearly states the verb (update) and resource (database). While it distinguishes from creation/retrieval siblings implicitly, it lacks specificity about what aspects can be updated (e.g., title, description, properties). A more descriptive sentence would improve clarity.

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 versus alternatives like notion_create_database or notion_retrieve_database. An agent has no context on prerequisites or when not to use it.

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