list-databases
Retrieve all accessible databases from your Notion workspace to view available data sources for AI interactions.
Instructions
List all databases the integration has access to
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list-databases"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.js:329-350 (handler)Handler for the 'list-databases' tool. Performs a Notion search filtered for databases, sorts by last edited time descending, and returns the results as JSON text.
if (name === "list-databases") { const response = await notion.search({ filter: { property: "object", value: "database", }, page_size: 100, sort: { direction: "descending", timestamp: "last_edited_time", }, }); return { content: [ { type: "text", text: JSON.stringify(response.results, null, 2), }, ], }; } - server.js:45-51 (registration)Registration of the 'list-databases' tool in the tools/list response, including its description and empty input schema (no parameters required).
name: "list-databases", description: "List all databases the integration has access to", inputSchema: { type: "object", properties: {} } }, - server.js:47-50 (schema)Input schema for the 'list-databases' tool, which is an empty object indicating no input parameters are required.
inputSchema: { type: "object", properties: {} }