Skip to content

Commit 351de00

Browse files
feat(arcadedb): add source and tools (googleapis#2961)
## Summary This PR implements native ArcadeDB support in the GenAI Toolbox by introducing a new `arcadedb` source and two associated tools for executing Cypher and SQL queries. ArcadeDB is a multi-model database supporting graph, document, key-value, and time-series workloads through the Bolt protocol. Since it is compatible with the Neo4j driver, this implementation reuses the existing `neo4j-go-driver`, enabling seamless integration with minimal additional complexity. This change resolves the feature request to add ArcadeDB as a supported source in the Toolbox. Fixes: googleapis#2689 --- ## What This PR Adds ### 1) New Source: `arcadedb` A fully functional source implementation that: - Registers a new source type: `arcadedb` - Uses the Neo4j Bolt protocol driver - Verifies connectivity during initialization - Supports configurable database selection - Integrates with OpenTelemetry tracing - Follows existing Toolbox source architecture patterns Key capabilities: - Bolt protocol connectivity - Standard authentication support - Config validation - Structured query execution - Telemetry-compatible initialization --- ### 2) New Tool: `arcadedb-execute-cypher` Executes OpenCypher queries against ArcadeDB. Features: - Read-only enforcement mode - Dry-run validation mode - Query classification (read vs write) - Execution plan inspection support Example: ```yaml kind: tool name: query_arcadedb type: arcadedb-execute-cypher source: my-arcadedb-source readOnly: true description: Execute Cypher queries against ArcadeDB --------- Co-authored-by: duwenxin99 <duwenxin@google.com> Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com>
1 parent 721c204 commit 351de00

14 files changed

Lines changed: 1826 additions & 0 deletions

File tree

‎.ci/integration.cloudbuild.yaml‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,6 +1477,33 @@ steps:
14771477
exit 0
14781478
fi
14791479
1480+
- id: "arcadedb"
1481+
name: golang:1
1482+
waitFor: ["compile-test-binary", "detect-changes"]
1483+
entrypoint: /bin/bash
1484+
env:
1485+
- "GOPATH=/gopath"
1486+
- "SERVICE_ACCOUNT_EMAIL=$SERVICE_ACCOUNT_EMAIL"
1487+
secretEnv: ["CLIENT_ID"]
1488+
volumes:
1489+
- name: "go"
1490+
path: "/gopath"
1491+
args:
1492+
- -c
1493+
- |
1494+
PATTERN="(^|/)arcadedb/|$$(cat .ci/core_pattern.txt)"
1495+
1496+
if grep -qE "$$PATTERN" /workspace/changed_files.txt; then
1497+
echo "Changes detected. Running ArcadeDB tests..."
1498+
.ci/test_with_coverage.sh \
1499+
"ArcadeDB" \
1500+
arcadedb \
1501+
arcadedb
1502+
else
1503+
echo "No relevant changes for ArcadeDB. Skipping shard."
1504+
exit 0
1505+
fi
1506+
14801507
- id: "mariadb"
14811508
name: golang:1
14821509
waitFor: ["compile-test-binary", "detect-changes"]

‎cmd/internal/imports.go‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020

2121
_ "github.com/googleapis/mcp-toolbox/internal/sources/alloydbadmin"
2222
_ "github.com/googleapis/mcp-toolbox/internal/sources/alloydbpg"
23+
_ "github.com/googleapis/mcp-toolbox/internal/sources/arcadedb"
2324
_ "github.com/googleapis/mcp-toolbox/internal/sources/bigquery"
2425
_ "github.com/googleapis/mcp-toolbox/internal/sources/bigtable"
2526
_ "github.com/googleapis/mcp-toolbox/internal/sources/cassandra"
@@ -76,6 +77,8 @@ import (
7677
_ "github.com/googleapis/mcp-toolbox/internal/tools/alloydb/alloydblistusers"
7778
_ "github.com/googleapis/mcp-toolbox/internal/tools/alloydb/alloydbwaitforoperation"
7879
_ "github.com/googleapis/mcp-toolbox/internal/tools/alloydbainl"
80+
_ "github.com/googleapis/mcp-toolbox/internal/tools/arcadedb/arcadedbexecutecypher"
81+
_ "github.com/googleapis/mcp-toolbox/internal/tools/arcadedb/arcadedbexecutesql"
7982
_ "github.com/googleapis/mcp-toolbox/internal/tools/bigquery/bigqueryanalyzecontribution"
8083
_ "github.com/googleapis/mcp-toolbox/internal/tools/bigquery/bigqueryconversationalanalytics"
8184
_ "github.com/googleapis/mcp-toolbox/internal/tools/bigquery/bigqueryexecutesql"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: "ArcadeDB"
3+
type: docs
4+
weight: 1
5+
description: >
6+
ArcadeDB is a multi-model database with Bolt protocol support.
7+
---
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
title: "ArcadeDB Source"
3+
linkTitle: "Source"
4+
type: docs
5+
weight: 1
6+
description: >
7+
ArcadeDB is a multi-model database with Bolt protocol support.
8+
no_list: true
9+
---
10+
11+
## About
12+
13+
[ArcadeDB][arcadedb-docs] is a multi-model database that supports graph (Cypher),
14+
document (SQL), key-value, and time-series data in one engine. It exposes a
15+
Bolt protocol endpoint compatible with the Neo4j driver.
16+
17+
[arcadedb-docs]: https://docs.arcadedb.com/
18+
19+
## Available Tools
20+
21+
{{< list-tools >}}
22+
23+
## Requirements
24+
25+
### Database User
26+
27+
This source uses standard authentication. Create an ArcadeDB user (or use the
28+
`root` user) that can connect over Bolt.
29+
30+
## Example
31+
32+
```yaml
33+
kind: source
34+
name: my-arcadedb-source
35+
type: arcadedb
36+
uri: bolt://localhost:7687
37+
user: root
38+
password: ${PASSWORD}
39+
database: "mydb"
40+
```
41+
42+
{{< notice tip >}}
43+
Use environment variable replacement with the format ${ENV_NAME}
44+
instead of hardcoding your secrets into the configuration file.
45+
{{< /notice >}}
46+
47+
## Reference
48+
49+
| **field** | **type** | **required** | **description** |
50+
|-------------|:--------:|:------------:|--------------------------------------------------------------------------------------|
51+
| type | string | true | Must be "arcadedb". |
52+
| uri | string | true | Bolt URI (e.g. "bolt://localhost:7687"). |
53+
| user | string | true | ArcadeDB user (e.g. "root"). |
54+
| password | string | true | Password for the ArcadeDB user. |
55+
| database | string | true | Database name to connect to. |
56+
| httpUri | string | false | Optional override for the ArcadeDB HTTP API base URL (e.g. "http://localhost:2480"). |
57+
| httpScheme | string | false | Optional scheme override for the ArcadeDB HTTP API. Defaults to "http". |
58+
| httpPort | integer | false | Optional port override for the ArcadeDB HTTP API. Defaults to 2480. |
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: "Tools"
3+
type: docs
4+
weight: 2
5+
no_list: true
6+
---
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: "arcadedb-execute-cypher Tool"
3+
type: docs
4+
weight: 1
5+
description: >
6+
Execute Cypher queries against ArcadeDB via Bolt.
7+
---
8+
9+
## About
10+
11+
`arcadedb-execute-cypher` executes an arbitrary Cypher query against an
12+
ArcadeDB source over the Bolt protocol. It supports a `readOnly` mode that
13+
rejects write statements and a `dry_run` mode that validates queries without
14+
executing them.
15+
16+
> **Note:** This tool is intended for developer assistant workflows with
17+
> human-in-the-loop and shouldn't be used for production agents.
18+
19+
## Compatible Sources
20+
21+
{{< compatible-sources >}}
22+
23+
## Example
24+
25+
```yaml
26+
kind: tool
27+
name: query_arcadedb
28+
type: arcadedb-execute-cypher
29+
source: my-arcadedb-source
30+
readOnly: true
31+
description: |
32+
Execute Cypher against ArcadeDB in read-only mode.
33+
Example:
34+
{{
35+
"cypher": "MATCH (n) RETURN count(n)"
36+
}}
37+
```
38+
39+
## Reference
40+
41+
| **field** | **type** | **required** | **description** |
42+
|-------------|:--------:|:------------:|------------------------------------------------------------------------------------------------------|
43+
| type | string | true | Must be "arcadedb-execute-cypher". |
44+
| source | string | true | Name of the ArcadeDB source the Cypher query should execute on. |
45+
| description | string | true | Description of the tool that is passed to the LLM. |
46+
| readOnly | boolean | false | If set to `true`, the tool will reject any write operations in the Cypher query. Default is `false`. |
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: "arcadedb-execute-sql Tool"
3+
type: docs
4+
weight: 2
5+
description: >
6+
Execute SQL queries against ArcadeDB.
7+
---
8+
9+
## About
10+
11+
`arcadedb-execute-sql` executes an arbitrary ArcadeDB SQL statement against an
12+
ArcadeDB source. ArcadeDB supports SQL for document and multi-model queries,
13+
allowing you to query graphs and documents from the same database.
14+
15+
> **Note:** This tool is intended for developer assistant workflows with
16+
> human-in-the-loop and shouldn't be used for production agents.
17+
18+
## Compatible Sources
19+
20+
{{< compatible-sources >}}
21+
22+
## Example
23+
24+
```yaml
25+
kind: tool
26+
name: query_arcadedb_sql
27+
type: arcadedb-execute-sql
28+
source: my-arcadedb-source
29+
description: |
30+
Execute SQL against ArcadeDB.
31+
Example:
32+
{{
33+
"sql": "SELECT FROM Person WHERE name = :name LIMIT 5",
34+
"params": {
35+
"name": "Ada"
36+
},
37+
"dry_run": false
38+
}}
39+
```
40+
41+
## Reference
42+
43+
| **field** | **type** | **required** | **description** |
44+
|-------------|:--------:|:------------:|------------------------------------------------------------------------------------------------|
45+
| type | string | true | Must be "arcadedb-execute-sql". |
46+
| source | string | true | Name of the ArcadeDB source the SQL should execute on. |
47+
| description | string | true | Description of the tool that is passed to the LLM. |
48+
| readOnly | boolean | false | If true, the statement is routed to a read-only endpoint, and ArcadeDB blocks write statements. |

0 commit comments

Comments
 (0)