datastore_list_kinds
List all entity kinds (tables) in Google Cloud Datastore using this tool. Enables quick access to available data structures for query and management purposes.
Instructions
List all available entity kinds (tables) in the Datastore
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"type": "object"
}
Implementation Reference
- src/index.ts:140-149 (handler)MCP tool handler for 'datastore_list_kinds': calls DatastoreClient.listKinds() and formats the response as text.case 'datastore_list_kinds': const kinds = await datastoreClient.listKinds(); return { content: [ { type: 'text', text: `Available entity kinds:\n${kinds.map((k: string) => `- ${k}`).join('\n')}`, }, ], };
- src/datastore.ts:13-22 (helper)DatastoreClient.listKinds(): Queries the '__kind__' namespace to retrieve and return all available entity kinds.async listKinds(): Promise<string[]> { try { const query = this.datastore.createQuery('__kind__').select('__key__'); const [entities] = await this.datastore.runQuery(query); return entities.map(entity => entity[this.datastore.KEY].name).filter(Boolean); } catch (error) { throw new Error(`Failed to list kinds: ${error instanceof Error ? error.message : 'Unknown error'}`); } }
- src/index.ts:29-35 (registration)Tool registration in ListTools response: defines name, description, and empty input schema.name: 'datastore_list_kinds', description: 'List all available entity kinds (tables) in the Datastore', inputSchema: { type: 'object', properties: {}, }, },
- src/index.ts:31-34 (schema)Input schema for 'datastore_list_kinds' tool: empty object (no parameters required).inputSchema: { type: 'object', properties: {}, },