mcpField
S
spanner-data

spanner-data

github.com/clineData & databases40698 installsUpdated 15w ago
Repository

About spanner-data

spanner-data is a skill for querying Google Spanner data and inspecting user-created schemas. It provides scripts for SQL execution and listings of tables and graphs, using the GoogleSQL interface.

Key features

  1. 01Execute DML SQL
  2. 02Execute DQL SQL
  3. 03List graph schemas
  4. 04List table schemas
  5. 05Filter schema listings by name

Use cases

  1. 01Run data-changing SQL in Spanner
  2. 02Query Spanner data with DQL
  3. 03Inspect graph labels and properties
  4. 04Review table columns, constraints, and indexes

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/cline/skills --skill spanner-data

After installing, type/spanner-datain Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

scripts/
execute_sql_dql.js
execute_sql.js
list_graphs.js
list_tables.js

Details

From the project README

Usage

All scripts can be executed using Node.js. Replace <param_name> and <param_value> with actual values.

Bash: node <skill_dir>/scripts/<script_name>.js '{"<param_name>": "<param_value>"}'

PowerShell: node <skill_dir>/scripts/<script_name>.js '{\"<param_name>\": \"<param_value>\"}'

Note: The scripts automatically load the environment variables from various .env files. Do not ask the user to set vars unless skill executions fails due to env var absence.

Scripts

execute_sql

Use this tool to execute DML SQL. Please use the googlesql interface for Spanner.

Parameters
NameTypeDescriptionRequiredDefault
sqlstringThe sql to execute.Yes

execute_sql_dql

Use this tool to execute DQL SQL. Please use the googlesql interface for Spanner.

Parameters
NameTypeDescriptionRequiredDefault
sqlstringThe sql to execute.Yes

list_graphs

Lists detailed graph schema information (node tables, edge tables, labels and property declarations) as JSON for user-created graphs. Filters by a comma-separated list of graph names. If names are omitted, lists all graphs. The output can be 'simple' (graph names only) or 'detailed' (full schema).

Parameters
NameTypeDescriptionRequiredDefault
graph_namesstringOptional: A comma-separated list of graph names. If empty, details for all graphs in user-accessible schemas will be listed.No``
output_formatstringOptional: Use 'simple' to return graph names only or use 'detailed' to return the full information schema.Nodetailed

list_tables

Lists detailed schema information (object type, columns, constraints, indexes) as JSON for user-created tables (ordinary or partitioned). Filters by a comma-separated list of names. If names are omitted, lists all tables in user schemas. The output can be 'simple' (table names only) or 'detailed' (full schema).

Parameters
NameTypeDescriptionRequiredDefault
table_namesstringOptional: A comma-separated list of table names. If empty, details for all tables in user-accessible schemas will be listed.No``
output_formatstringOptional: Use 'simple' to return table names only or use 'detailed' to return the full information schema.Nodetailed

Comments

Markdown supported