Skip to main content
Glama

list_databases

Discover and access all available Notion databases to retrieve their IDs, titles, creation times, and archive status for integration setup.

Instructions

Lists all Notion databases accessible to the integration. Returns each database's ID, title, creation time, and archive status. Use this to discover available databases.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration of the 'list_databases' tool, including name, description, and empty input schema.
    {
      name: 'list_databases',
      description: 'Lists all Notion databases accessible to the integration. Returns each database\'s ID, title, creation time, and archive status. Use this to discover available databases.',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Primary handler for the 'list_databases' tool call, which executes the use case and formats the MCP response.
    private async handleListDatabases() {
      const result = await this.dependencies.listDatabasesUseCase.execute();
    
      return {
        content: [
          {
            type: 'text' as const,
            text: JSON.stringify(
              result.map((db) => ({
                id: db.id.toString(),
                title: db.title,
                createdTime: db.createdTime,
                archived: db.archived,
              })),
              null,
              2
            ),
          },
        ],
      };
  • Use case class providing the core logic: delegates to database repository to list all databases.
    export class ListDatabasesUseCase {
      constructor(private readonly databaseRepository: IDatabaseRepository) {}
    
      async execute(): Promise<Database[]> {
        return await this.databaseRepository.findAll();
      }
    }
Behavior3/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. It describes the return format ('ID, title, creation time, and archive status') and the scope ('accessible to the integration'), which are useful. However, it lacks details on permissions, rate limits, pagination, or error handling, leaving some behavioral aspects unclear for a 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 two sentences, front-loaded with the core purpose and followed by usage guidance. Every sentence adds value: the first specifies what the tool does and what it returns, and the second provides context for when to use it. There is zero waste or redundancy.

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

Completeness4/5

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

Given the tool's simplicity (0 parameters, no annotations, no output schema), the description is reasonably complete. It covers the purpose, return data, and usage context. However, without annotations or an output schema, it could benefit from more behavioral details (e.g., pagination, error cases), slightly reducing completeness for a read operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema already fully documents the inputs. The description adds no parameter-specific information, which is expected. According to the rules, 0 parameters baseline is 4, as there is nothing to compensate for, and the description does not contradict the schema.

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

Purpose5/5

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

The description clearly states the specific action ('Lists all Notion databases'), specifies the resource ('accessible to the integration'), and distinguishes it from siblings like 'get_database' (which retrieves a specific database) and 'query_pages' (which queries pages within databases). The verb+resource combination is precise and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool ('to discover available databases'), which implicitly distinguishes it from siblings that require a specific database ID (e.g., 'get_database', 'update_database') or perform mutations (e.g., 'create_page'). However, it does not explicitly state when NOT to use it or name alternatives, keeping it at a 4.

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

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