chore: import upstream snapshot with attribution
CF: Deploy Dev Docs / deploy (push) Has been cancelled
Sync Labels / build (push) Has been cancelled
tests / unit tests (macos-latest) (push) Has been cancelled
tests / unit tests (windows-latest) (push) Has been cancelled
tests / unit tests (ubuntu-latest) (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 13:32:45 +08:00
commit e04ed9c211
1798 changed files with 307905 additions and 0 deletions
@@ -0,0 +1,4 @@
---
title: "Cloud SQL for PostgreSQL"
weight: 1
---
@@ -0,0 +1,5 @@
---
title: "Prebuilt Configs"
type: docs
description: "Prebuilt configurations for Cloud Sql Postgres."
---
@@ -0,0 +1,59 @@
---
title: "Cloud SQL for PostgreSQL"
type: docs
description: "Details of the Cloud SQL for PostgreSQL prebuilt configuration."
---
## Cloud SQL for PostgreSQL
* `--prebuilt` value: `cloud-sql-postgres`
* **Environment Variables:**
* `CLOUD_SQL_POSTGRES_PROJECT`: The GCP project ID.
* `CLOUD_SQL_POSTGRES_REGION`: The region of your Cloud SQL instance.
* `CLOUD_SQL_POSTGRES_INSTANCE`: The ID of your Cloud SQL instance.
* `CLOUD_SQL_POSTGRES_DATABASE`: The name of the database to connect to.
* `CLOUD_SQL_POSTGRES_USER`: (Optional) The database username. Defaults to
IAM authentication if unspecified.
* `CLOUD_SQL_POSTGRES_PASSWORD`: (Optional) The password for the database
user. Defaults to IAM authentication if unspecified.
* `CLOUD_SQL_POSTGRES_IP_TYPE`: (Optional) The IP type i.e. "Public" or
"Private" (Default: Public).
* **Permissions:**
* **Cloud SQL Client** (`roles/cloudsql.client`) to connect to the
instance.
* Database-level permissions (e.g., `SELECT`, `INSERT`) are required to
execute queries.
* **Tools:**
* `execute_sql`: Executes a SQL query.
* `list_tables`: Lists tables in the database.
* `list_active_queries`: Lists ongoing queries.
* `list_available_extensions`: Discover all PostgreSQL extensions available for installation.
* `list_installed_extensions`: List all installed PostgreSQL extensions.
* `long_running_transactions`: Identifies and lists database transactions that exceed a specified time limit.
* `list_locks`: Identifies all locks held by active processes.
* `replication_stats`: Lists each replica's process ID and sync state.
* `list_autovacuum_configurations`: Lists autovacuum configurations in the
database.
* `list_memory_configurations`: Lists memory-related configurations in the
database.
* `list_top_bloated_tables`: List top bloated tables in the database.
* `list_replication_slots`: Lists replication slots in the database.
* `list_invalid_indexes`: Lists invalid indexes in the database.
* `get_query_plan`: Generate the execution plan of a statement.
* `list_views`: Lists views in the database from pg_views with a default
limit of 50 rows. Returns schemaname, viewname and the ownername.
* `list_schemas`: Lists schemas in the database.
* `database_overview`: Fetches the current state of the PostgreSQL server.
* `list_triggers`: Lists triggers in the database.
* `list_indexes`: List available user indexes in a PostgreSQL database.
* `list_sequences`: List sequences in a PostgreSQL database.
* `list_query_stats`: Lists query statistics.
* `get_column_cardinality`: Gets column cardinality.
* `list_table_stats`: Lists table statistics.
* `list_publication_tables`: List publication tables in a PostgreSQL database.
* `list_tablespaces`: Lists tablespaces in the database.
* `list_pg_settings`: List configuration parameters for the PostgreSQL server.
* `list_database_stats`: Lists the key performance and activity statistics for
each database in the postgreSQL instance.
* `list_roles`: Lists all the user-created roles in PostgreSQL database.
* `list_stored_procedure`: Lists stored procedures.
+148
View File
@@ -0,0 +1,148 @@
---
title: "Cloud SQL for PostgreSQL Source"
linkTitle: "Source"
type: docs
weight: 1
description: >
Cloud SQL for PostgreSQL is a fully-managed database service for Postgres.
no_list: true
---
## About
[Cloud SQL for PostgreSQL][csql-pg-docs] is a fully-managed database service
that helps you set up, maintain, manage, and administer your PostgreSQL
relational databases on Google Cloud Platform.
If you are new to Cloud SQL for PostgreSQL, you can try [creating and connecting
to a database by following these instructions][csql-pg-quickstart].
[csql-pg-docs]: https://cloud.google.com/sql/docs/postgres
[csql-pg-quickstart]:
https://cloud.google.com/sql/docs/postgres/connect-instance-local-computer
## Available Tools
{{< list-tools dirs="/integrations/postgres/tools" >}}
### Pre-built Configurations
- [Cloud SQL for Postgres using
MCP](https://mcp-toolbox.dev/documentation/connect-to/ides/cloud_sql_pg_mcp/)
Connect your IDE to Cloud SQL for Postgres using Toolbox.
## Requirements
### IAM Permissions
By default, this source uses the [Cloud SQL Go Connector][csql-go-conn] to
authorize and establish mTLS connections to your Cloud SQL instance. The Go
connector uses your [Application Default Credentials (ADC)][adc] to authorize
your connection to Cloud SQL.
In addition to [setting the ADC for your server][set-adc], you need to ensure
the IAM identity has been given the following IAM roles (or corresponding
permissions):
- `roles/cloudsql.client`
{{< notice tip >}}
If you are connecting from Compute Engine, make sure your VM
also has the [proper
scope](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
to connect using the Cloud SQL Admin API.
{{< /notice >}}
[csql-go-conn]: <https://github.com/GoogleCloudPlatform/cloud-sql-go-connector>
[adc]: <https://cloud.google.com/docs/authentication#adc>
[set-adc]: <https://cloud.google.com/docs/authentication/provide-credentials-adc>
### Networking
Cloud SQL supports connecting over both from external networks via the internet
([public IP][public-ip]), and internal networks ([private IP][private-ip]).
For more information on choosing between the two options, see the Cloud SQL page
[Connection overview][conn-overview].
You can configure the `ipType` parameter in your source configuration to
`public` or `private` to match your cluster's configuration. Regardless of which
you choose, all connections use IAM-based authorization and are encrypted with
mTLS.
[private-ip]: https://cloud.google.com/sql/docs/postgres/configure-private-ip
[public-ip]: https://cloud.google.com/sql/docs/postgres/configure-ip
[conn-overview]: https://cloud.google.com/sql/docs/postgres/connect-overview
### Authentication
This source supports both password-based authentication and IAM
authentication (using your [Application Default Credentials][adc]).
#### Standard Authentication
To connect using user/password, [create
a PostgreSQL user][cloudsql-users] and input your credentials in the `user` and
`password` fields.
```yaml
user: ${USER_NAME}
password: ${PASSWORD}
```
#### IAM Authentication
To connect using IAM authentication:
1. Prepare your database instance and user following this [guide][iam-guide].
2. You could choose one of the two ways to log in:
- Specify your IAM email as the `user`.
- Leave your `user` field blank. Toolbox will fetch the [ADC][adc]
automatically and log in using the email associated with it.
3. Leave the `password` field blank.
[iam-guide]: https://cloud.google.com/sql/docs/postgres/iam-logins
[cloudsql-users]: https://cloud.google.com/sql/docs/postgres/create-manage-users
## Example
```yaml
kind: source
name: my-cloud-sql-pg-source
type: cloud-sql-postgres
project: my-project-id
region: us-central1
instance: my-instance
database: my_db
user: ${USER_NAME}
password: ${PASSWORD}
# ipType: "private"
```
{{< notice tip >}}
Use environment variable replacement with the format ${ENV_NAME}
instead of hardcoding your secrets into the configuration file.
{{< /notice >}}
### Managed Connection Pooling
Toolbox automatically supports [Managed Connection Pooling][csql-mcp]. If your Cloud SQL for PostgreSQL instance has Managed Connection Pooling enabled, the connection will immediately benefit from increased throughput and reduced latency.
The interface is identical, so there's no additional configuration required on the client. For more information on configuring your instance, see the [Cloud SQL Managed Connection Pooling documentation][csql-mcp-docs].
[csql-mcp]: https://docs.cloud.google.com/sql/docs/postgres/managed-connection-pooling
[csql-mcp-docs]: https://docs.cloud.google.com/sql/docs/postgres/configure-mcp
## Reference
| **field** | **type** | **required** | **description** |
|-----------|:--------:|:------------:|--------------------------------------------------------------------------------------------------------------------------|
| type | string | true | Must be "cloud-sql-postgres". |
| project | string | true | Id of the GCP project that the cluster was created in (e.g. "my-project-id"). |
| region | string | true | Name of the GCP region that the cluster was created in (e.g. "us-central1"). |
| instance | string | true | Name of the Cloud SQL instance within the cluster (e.g. "my-instance"). |
| database | string | true | Name of the Postgres database to connect to (e.g. "my_db"). |
| user | string | false | Name of the Postgres user to connect as (e.g. "my-pg-user"). Defaults to IAM auth using [ADC][adc] email if unspecified. |
| password | string | false | Password of the Postgres user (e.g. "my-password"). Defaults to attempting IAM authentication if unspecified. |
| ipType | string | false | IP Type of the Cloud SQL instance; must be one of `public`, `private`, or `psc`. Default: `public`. |
| sqlCommenter | boolean | false | Overrides the global `--sql-commenter` flag for this source. When set, it takes priority; when omitted, the global flag applies. |
@@ -0,0 +1,7 @@
---
title: "Tools"
weight: 2
shared_tools:
- source: "/integrations/postgres/tools"
header: "Postgres Tools"
---
@@ -0,0 +1,59 @@
---
title: "vector-assist-apply-spec"
type: docs
weight: 1
description: >
The "vector-assist-apply-spec" tool automatically executes all SQL recommendations
associated with a specific vector specification or table to finalize the
vector search setup.
---
## About
The `vector-assist-apply-spec` tool automatically executes all the SQL recommendations associated with a specific vector specification (spec_id) or table. It runs the necessary commands in the correct sequence to provision the workload, marking each step as applied once successful.
Use this tool when the user has reviewed the generated recommendations from a defined (or modified) spec and is ready to apply the changes directly to their database instance to finalize the vector search setup. Under the hood, this tool connects to the target database and executes the `vector_assist.apply_spec` function.
## Compatible Sources
{{< compatible-sources >}}
## Requirements
{{< notice tip >}}
Ensure that your target PostgreSQL database has the required `vector_assist` extension installed, in order for this tool to execute successfully.
{{< /notice >}}
## Parameters
The tool takes the following input parameters:
| Parameter | Type | Description | Required |
| :------------ | :----- | :-------------------------------------------------------------------- | :------- |
| `spec_id` | string | Unique ID of the vector specification to apply. | No |
| `table_name` | string | Target table name for applying the vector specification. | No |
| `column_name` | string | Text or vector column name to uniquely identify the specification. | No |
| `schema_name` | string | Schema name for the target table. | No |
> Note
> Parameters are marked as required or optional based on the vector assist function definitions.
> The function may perform further validation on optional parameters to ensure all necessary
> data is available before returning a response.
## Example
```yaml
kind: tool
name: apply_spec
type: vector-assist-apply-spec
source: my-database-source
description: "This tool automatically executes all the SQL recommendations associated with a specific vector specification (spec_id) or table. It runs the necessary commands in the correct sequence to provision the workload, marking each step as applied once successful. Use this tool when the user has reviewed the generated recommendations from a defined (or modified) spec and is ready to apply the changes directly to their database instance to finalize the vector search setup."
```
## Reference
| **field** | **type** | **required** | **description** |
|-------------|:--------:|:------------:|------------------------------------------------------|
| type | string | true | Must be "vector-assist-apply-spec". |
| source | string | true | Name of the source the SQL should execute on. |
| description | string | false | Description of the tool that is passed to the agent. |
@@ -0,0 +1,73 @@
---
title: "vector-assist-define-spec"
type: docs
weight: 1
description: >
The "vector-assist-define-spec" tool defines a new vector specification by
capturing the user's intent and requirements for a vector search workload,
generating SQL recommendations for setting up database, embeddings, and
vector indexes.
---
## About
The `vector-assist-define-spec` tool defines a new vector specification by capturing the user's intent and requirements for a vector search workload. It generates a complete, ordered set of SQL recommendations required to set up the database, embeddings, and vector indexes.
Use this tool at the very beginning of the vector setup process when an agent or user first wants to configure a table for vector search, generate embeddings, or create a new vector index. Under the hood, this tool connects to the target database and executes the `vector_assist.define_spec` function to generate the necessary specifications.
## Compatible Sources
{{< compatible-sources >}}
## Requirements
{{< notice tip >}}
Ensure that your target PostgreSQL database has the required `vector_assist` extension installed, in order for this tool to execute successfully.
{{< /notice >}}
## Parameters
The tool takes the following input parameters:
| Parameter | Type | Description | Required |
| :----------------------- | :------ | :--------------------------------------------------------------------- | :------- |
| `table_name` | string | Target table name for setting up the vector workload. | Yes |
| `schema_name` | string | Name of the schema containing the target table. | No |
| `spec_id` | string | Unique ID for the vector specification; auto-generated if omitted. | No |
| `vector_column_name` | string | Name of the column containing the vector embeddings. | No |
| `text_column_name` | string | Name of the text column for setting up vector search. | No |
| `vector_index_type` | string | Type of vector index ('hnsw', 'ivfflat', or 'scann'). | No |
| `embeddings_available` | boolean | Indicates if vector embeddings already exist in the table. | No |
| `num_vectors` | integer | Expected total number of vectors in the dataset. | No |
| `dimensionality` | integer | Dimension of existing vectors or the chosen embedding model. | No |
| `embedding_model` | string | Model to be used for generating vector embeddings. | No |
| `prefilter_column_names` | array | List of columns to use for prefiltering vector queries. | No |
| `distance_func` | string | Distance function for comparing vectors ('cosine', 'ip', 'l2', 'l1'). | No |
| `quantization` | string | Quantization method for vector indexes ('none', 'halfvec', 'bit'). | No |
| `memory_budget_kb` | integer | Maximum memory (in KB) the index can use during build. | No |
| `target_recall` | float | Target recall rate for standard vector queries using this index. | No |
| `target_top_k` | integer | Number of top results (top-K) to retrieve per query. | No |
| `tune_vector_index` | boolean | Indicates whether automatic tuning is required for the index. | No |
> Note
> Parameters are marked as required or optional based on the vector assist function definitions.
> The function may perform further validation on optional parameters to ensure all necessary
> data is available before returning a response.
## Example
```yaml
kind: tool
name: define_spec
type: vector-assist-define-spec
source: my-database-source
description: "This tool defines a new vector specification by capturing the user's intent and requirements for a vector search workload. This generates a complete, ordered set of SQL recommendations required to set up the database, embeddings, and vector indexes. Use this tool at the very beginning of the vector setup process when a user first wants to configure a table for vector search, generate embeddings, or create a new vector index."
```
## Reference
| **field** | **type** | **required** | **description** |
|-------------|:--------:|:------------:|------------------------------------------------------|
| type | string | true | Must be "vector-assist-define-spec". |
| source | string | true | Name of the source the SQL should execute on. |
| description | string | false | Description of the tool that is passed to the agent. |
@@ -0,0 +1,54 @@
---
title: "vector-assist-delete-spec"
type: docs
weight: 1
description: >
The "vector-assist-delete-spec" tool deletes an existing vector specification and its associated metadata using its spec_id.
---
## About
The `vector-assist-delete-spec` tool deletes an existing vector specification using its `spec_id`.
Use this tool when a user explicitly requests to delete, remove, or clean up an existing vector specification which was created in the context of the vector assist tools. Under the hood, this tool connects to the target database and executes the `vector_assist.delete_spec` function.
## Compatible Sources
{{< compatible-sources >}}
## Requirements
{{< notice tip >}}
Ensure that your target PostgreSQL database has the required `vector_assist` extension installed, in order for this tool to execute successfully.
{{< /notice >}}
## Parameters
The tool takes the following input parameters:
| Parameter | Type | Description | Required |
| :-------- | :----- | :----------------------------------------- | :------- |
| `spec_id` | string | Unique ID for the vector spec to delete. | Yes |
> Note :
> Parameters are marked as required or optional based on the tool's parameter definitions.
> The underlying function may perform further validation on optional parameters to ensure
> all necessary data is available before returning a response.
## Example
```yaml
kind: tool
name: delete_spec
type: vector-assist-delete-spec
source: my-database-source
description: "This tool deletes an existing vector specification using its spec_id. Use this tool when a user explicitly requests to delete, remove, or clean up an existing vector specification which was created in the context of the vector assist tools."
```
## Reference
| **field** | **type** | **required** | **description** |
|-------------|:--------:|:------------:|------------------------------------------------------|
| type | string | true | Must be "vector-assist-delete-spec". |
| source | string | true | Name of the source the SQL should execute on. |
| description | string | false | Description of the tool that is passed to the agent. |
@@ -0,0 +1,65 @@
---
title: "vector-assist-generate-query"
type: docs
weight: 1
description: >
The "vector-assist-generate-query" tool produces optimized SQL queries for
vector search, leveraging metadata and specifications to enable semantic
and similarity searches.
---
## About
The `vector-assist-generate-query` tool generates optimized SQL queries for vector search by leveraging the metadata and vector specifications defined in a specific spec_id. It serves as the primary actionable tool for generating the executable SQL required to retrieve relevant results based on vector similarity.
The tool contextually understands requirements such as distance functions, quantization, and filtering to ensure the resulting query is compatible with the corresponding vector index. Additionally, it can automatically handle iterative index scans for filtered queries and calculate the necessary search parameters (like ef_search) to meet a target recall.
## Compatible Sources
{{< compatible-sources >}}
## Requirements
{{< notice tip >}}
Ensure that your target PostgreSQL database has the required `vector_assist` extension installed, in order for this tool to execute successfully.
{{< /notice >}}
## Parameters
The tool takes the following input parameters:
| Parameter | Type | Description | Required |
| :----------------------- | :------ | :------------------------------------------------------------------ | :------- |
| `spec_id` | string | Unique ID of the vector spec for query generation. | No |
| `table_name` | string | Target table name for generating the vector query. | No |
| `schema_name` | string | Schema name for the query's target table. | No |
| `column_name` | string | Text or vector column name identifying the specific spec. | No |
| `search_text` | string | Text string to search for; embeddings are auto-generated. | No |
| `search_vector` | string | Vector to search for; use instead of search_text. | No |
| `output_column_names` | array | List of columns to retrieve in the search results. | No |
| `top_k` | integer | Number of nearest neighbors to return (defaults to 10). | No |
| `filter_expressions` | array | List of filter expressions applied to the vector query. | No |
| `target_recall` | float | Target recall rate, overriding the spec-level default. | No |
| `iterative_index_search` | boolean | Enables iterative search for filtered queries to guarantee results. | No |
> Note
> Parameters are marked as required or optional based on the vector assist function definitions.
> The function may perform further validation on optional parameters to ensure all necessary
> data is available before returning a response.
## Example
```yaml
kind: tool
name: generate_query
type: vector-assist-generate-query
source: my-database-source
description: "This tool generates optimized SQL queries for vector search by leveraging the metadata and vector specifications defined in a specific spec_id. It may return a single query or a sequence of multiple SQL queries that can be executed sequentially. Use this tool when a user wants to perform semantic or similarity searches on their data. It serves as the primary actionable tool to invoke for generating the executable SQL required to retrieve relevant results based on vector similarity."
```
## Reference
| **field** | **type** | **required** | **description** |
|-------------|:--------:|:------------:|------------------------------------------------------|
| type | string | true | Must be "vector-assist-generate-query". |
| source | string | true | Name of the source the SQL should execute on. |
| description | string | false | Description of the tool that is passed to the agent. |
@@ -0,0 +1,54 @@
---
title: "vector-assist-get-spec"
type: docs
weight: 1
description: >
The "vector-assist-get-spec" tool retrieves the details of an existing vector specification using its unique spec_id.
---
## About
The `vector-assist-get-spec` tool retrieves the details of an existing vector specification using its unique `spec_id`.
Use this tool to retrieve a vector specification which was created in the context of the vector assist tools. It allows users to inspect the detailed parameters and current state of a particular vector setup. Under the hood, this tool connects to the target database and executes the `vector_assist.get_spec` function.
## Compatible Sources
{{< compatible-sources >}}
## Requirements
{{< notice tip >}}
Ensure that your target PostgreSQL database has the required `vector_assist` extension installed, in order for this tool to execute successfully.
{{< /notice >}}
## Parameters
The tool takes the following input parameters:
| Parameter | Type | Description | Required |
| :-------- | :----- | :------------------------------- | :------- |
| `spec_id` | string | Unique ID for the vector spec. | Yes |
> Note :
> Parameters are marked as required or optional based on the tool's parameter definitions.
> The underlying function may perform further validation on optional parameters to ensure
> all necessary data is available before returning a response.
## Example
```yaml
kind: tool
name: get_spec
type: vector-assist-get-spec
source: my-database-source
description: "This tool retrieves the details of an existing vector specification using its unique 'spec_id'. Use this tool to retrieve a vector specification which was created in the context of the vector assist tools."
```
## Reference
| **field** | **type** | **required** | **description** |
|-------------|:--------:|:------------:|------------------------------------------------------|
| type | string | true | Must be "vector-assist-get-spec". |
| source | string | true | Name of the source the SQL should execute on. |
| description | string | false | Description of the tool that is passed to the agent. |
@@ -0,0 +1,60 @@
---
title: "vector-assist-improve-query-recall"
type: docs
weight: 1
description: >
The "vector-assist-improve-query-recall" tool generates SQL recommendations to improve search accuracy for users experiencing degraded recall.
---
## About
The `vector-assist-improve-query-recall` tool is designed to troubleshoot and optimize existing vector search workloads when a user reports irrelevant results, poor accuracy, or degraded recall.
It determines the optimal tuning parameter (such as `hnsw.ef_search`) for an active vector index to improve the search results. The tool evaluates the target recall and outputs an actionable SQL query recommendation (e.g., `SET hnsw.ef_search TO ...`) that must be executed as a next action using the `execute_sql` tool.
## Compatible Sources
{{< compatible-sources >}}
## Requirements
{{< notice tip >}}
Ensure that your target PostgreSQL database has the required `vector_assist` extension installed. This tool requires an existing HNSW index to function properly; if the table lacks an existing vector setup, use the `define_spec` tool instead.
{{< /notice >}}
## Parameters
The tool takes the following input parameters:
| Parameter | Type | Description | Required |
| :------------------- | :------ | :-------------------------------------------------------------------------- | :------- |
| `table_name` | string | Table name experiencing degraded vector search recall. | Yes |
| `vector_column_name` | string | Column name containing the vector embeddings. | Yes |
| `index_name` | string | Name of the vector index to tune. | Yes |
| `schema_name` | string | Schema name of the table (default is `public`). | No |
| `top_k` | integer | Top k value for the vector search (default is `10`). | No |
| `target_recall` | float | Target recall value for search results (default is `0.95`). | No |
| `distance_func` | string | Distance function used for the vector search similarity (default is `cosine`).| No |
> Note :
> Parameters are marked as required or optional based on the tool's parameter definitions.
> The underlying function may perform further validation on optional parameters to ensure
> all necessary data is available before returning a response.
## Example
```yaml
kind: tool
name: improve_query_recall
type: vector-assist-improve-query-recall
source: my-database-source
description: "Use this tool to troubleshoot and optimize existing vector search workloads when a user reports irrelevant results, poor accuracy, or degraded recall. It determines the optimal tuning parameter (such as ef_search) for an active vector index to improve the search results. The tool outputs an actionable SQL query recommendation to be executed as a next action using the 'execute_sql' tool."
```
## Reference
| **field** | **type** | **required** | **description** |
|-------------|:--------:|:------------:|------------------------------------------------------|
| type | string | true | Must be "vector-assist-improve-query-recall". |
| source | string | true | Name of the source the SQL should execute on. |
| description | string | false | Description of the tool that is passed to the agent. |
@@ -0,0 +1,55 @@
---
title: "vector-assist-list-specs"
type: docs
weight: 1
description: >
The "vector-assist-list-specs" tool retrieves a list of all defined vector specifications for a given table and column.
---
## About
The `vector-assist-list-specs` tool lists all defined vector specifications for a given table and column name.
Use this tool to list vector specifications which were created in the context of the vector assist tools. It provides a high-level overview of existing vector setups. Under the hood, this tool connects to the target database and executes the `vector_assist.list_specs` function.
## Compatible Sources
{{< compatible-sources >}}
## Requirements
{{< notice tip >}}
Ensure that your target PostgreSQL database has the required `vector_assist` extension installed, in order for this tool to execute successfully.
{{< /notice >}}
## Parameters
The tool takes the following input parameters:
| Parameter | Type | Description | Required |
| :------------ | :----- | :--------------------------------------------------- | :------- |
| `table_name` | string | Table name to list vector specifications for. | Yes |
| `column_name` | string | Column name to list vector specifications for. | No |
> Note :
> Parameters are marked as required or optional based on the tool's parameter definitions.
> The underlying function may perform further validation on optional parameters to ensure
> all necessary data is available before returning a response.
## Example
```yaml
kind: tool
name: list_specs
type: vector-assist-list-specs
source: my-database-source
description: "This tool lists all defined vector specifications for a given table and column name. Use this tool to list vector specifications which were created in the context of the vector assist tools."
```
## Reference
| **field** | **type** | **required** | **description** |
|-------------|:--------:|:------------:|------------------------------------------------------|
| type | string | true | Must be "vector-assist-list-specs". |
| source | string | true | Name of the source the SQL should execute on. |
| description | string | false | Description of the tool that is passed to the agent. |
@@ -0,0 +1,72 @@
---
title: "vector-assist-modify-spec"
type: docs
weight: 1
description: >
The "vector-assist-modify-spec" tool modifies an existing vector specification
with new parameters or overrides, recalculating the generated SQL
recommendations to match the updated requirements.
---
## About
The `vector-assist-modify-spec` tool modifies an existing vector specification (identified by a required `spec_id`) with new parameters or overrides. Upon modification, it automatically recalculates and refreshes the list of generated recommendations by `vector_assist.define-spec` to match the updated spec requirements.
Use this tool when a user or agent wants to adjust or fine-tune the configuration of an already defined vector spec (such as changing the target recall, embedding model, or quantization) before actually executing the setup commands. Under the hood, this tool connects to the target database and executes the `vector_assist.modify_spec` function to generate the updated specifications.
## Compatible Sources
{{< compatible-sources >}}
## Requirements
{{< notice tip >}}
Ensure that your target PostgreSQL database has the required `vector_assist` extension installed, and that the `vector_assist.modify_spec` function is available in order for this tool to execute successfully.
{{< /notice >}}
## Parameters
The tool takes the following input parameters:
| Parameter | Type | Description | Required |
| :----------------------- | :------ | :--------------------------------------------------------------------- | :------- |
| `spec_id` | string | Unique ID of the vector specification to modify. | Yes |
| `table_name` | string | New table name for the vector workload setup. | No |
| `schema_name` | string | New schema name containing the target table. | No |
| `vector_column_name` | string | New name for the column containing vector embeddings. | No |
| `text_column_name` | string | New name for the text column for vector search. | No |
| `vector_index_type` | string | New vector index type ('hnsw', 'ivfflat', or 'scann'). | No |
| `embeddings_available` | boolean | Update if vector embeddings already exist in the table. | No |
| `num_vectors` | integer | Update the expected total number of vectors. | No |
| `dimensionality` | integer | Update the dimension of vectors or the embedding model. | No |
| `embedding_model` | string | Update the model used for generating vector embeddings. | No |
| `prefilter_column_names` | array | Update the columns used for prefiltering vector queries. | No |
| `distance_func` | string | Update the distance function ('cosine', 'ip', 'l2', 'l1'). | No |
| `quantization` | string | Update the quantization method ('none', 'halfvec', 'bit'). | No |
| `memory_budget_kb` | integer | Update maximum memory (in KB) for index building. | No |
| `target_recall` | float | Update the target recall rate for the index. | No |
| `target_top_k` | integer | Update the number of top results (top-K) to retrieve. | No |
| `tune_vector_index` | boolean | Update whether automatic tuning is required for the index. | No |
> Note
> Parameters are marked as required or optional based on the vector assist function definitions.
> The function may perform further validation on optional parameters to ensure all necessary
> data is available before returning a response.
## Example
```yaml
kind: tool
name: modify_spec
type: vector-assist-modify-spec
source: my-database-source
description: "This tool modifies an existing vector specification (identified by a required spec_id) with new parameters or overrides. Upon modification, it automatically recalculates and refreshes the list of generated SQL recommendations to match the updated requirements. Use this tool when a user wants to adjust or fine-tune the configuration of an already defined vector spec (such as changing the target recall, embedding model, or quantization) before actually executing the setup commands."
```
## Reference
| **field** | **type** | **required** | **description** |
|-------------|:--------:|:------------:|------------------------------------------------------|
| type | string | true | Must be "vector-assist-modify-spec". |
| source | string | true | Name of the source the SQL should execute on. |
| description | string | false | Description of the tool that is passed to the agent. |