Get a database

SDK platic.tools.databases.get()

Read the connection and its password authorization. nextStep tells you what to do next. To see every connection, use list databases.

Example

await platic.tools.databases.get("db_123");

Path parameters

ParameterTypeDescriptionRequired
databaseIdstringThe id of the connection✓

Response

200 OK. It never includes the password.

{
  "status": "success",
  "data": {
    "id": "Xb2mQe7LtR9sKd4fHw1N",
    "name": "store",
    "description": "Orders, customers, and inventory of the online store.",
    "engine": "postgres",
    "host": "db.example.com",
    "port": 5432,
    "database": "store",
    "user": "readonly",
    "ssl": "require",
    "status": "enabled",
    "hiddenTables": ["payments"],
    "hiddenColumns": ["customers.phone"],
    "pageSize": 50,
    "timeoutSeconds": 5,
    "password": { "state": "authorized", "secretId": "7e4a1c9b3d5f7a0c2e4b6d8f0a1c3e5b7d9f1a3c5e7b9d0f2a4c6e8b0d2f4a6c", "secretName": "Password of the store database" },
    "tools": [
      { "id": "Xb2mQe7LtR9sKd4fHw1N_list_tables", "name": "db_store_list_tables", "tool": "list_tables" },
      { "id": "Xb2mQe7LtR9sKd4fHw1N_describe_table", "name": "db_store_describe_table", "tool": "describe_table" },
      { "id": "Xb2mQe7LtR9sKd4fHw1N_query", "name": "db_store_query", "tool": "query" },
      { "id": "Xb2mQe7LtR9sKd4fHw1N_next_page", "name": "db_store_next_page", "tool": "next_page" }
    ],
    "lastTest": { "ok": true, "at": "2026-11-14T16:01:12.000Z", "version": "PostgreSQL 16.4", "tableCount": 3 },
    "createdAt": "2026-11-14T16:00:00.000Z",
    "updatedAt": "2026-11-14T16:01:12.000Z",
    "nextStep": "Ready. Give its tools to an agent with PUT /v1/agents/{agentId}/tools/{toolId} and a toolId from tools."
  }
}

Response fields

FieldTypeDescription
idstringThe id of the connection
name, descriptionstringAs they were created. description is "" if it has none
engine, host, port, database, user, sslvariousThe connection details
statusstringenabled or paused
hiddenTables, hiddenColumnsstring[]What the agent does not see
pageSize, timeoutSecondsnumberRows per page and time limit of each query
passwordobjectstate (authorized, needs_authorization, bound, or none), secretId, and, if the credential can read secrets, secretName. See the password
toolsarrayThe four tools in the catalog: id (the toolId to connect it to an agent), name, and tool (list_tables, describe_table, query, or next_page)
lastTestobject | nullThe last test: ok, at, and, if it connected, version and tableCount; if it failed, code and message. null before the first test and after the connection details change
createdAt, updatedAtstring | nullISO 8601
nextStepstringWhat is missing, in English

Errors

Statusdetails.codeWhen it happens
403FORBIDDENThe person behind the token does not have access to Integrations
404NOT_FOUNDThere is no connection with that id in the workspace