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(); } }

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