Tool: list_entities_and_dependencies
Gets the entities and their dependency information of a conversion workspace. The dependency information shows for each entity on which other entities it directly depends on. Note that the dependency on the schema is not included, for example, table 'Person.IDs' depends on schema 'Persons' but the schema is not listed as a dependency. All entities, including those without dependencies are included in the response.
- If no 'next_page_token' is returned, there are no more entities to retrieve.
nameparameter is in the form 'projects/{project name}/locations/{location}/conversionWorkspaces/{conversion_workspace_name}', for example: 'projects/my-project/locations/us-central1/conversionWorkspaces/cs1'.schemasparameter is an optional list of schemas to be included in the response, for example: ['Person', 'HR']. An empty list means all schemas are selected.entities_full_namesparameter is an optional list of entities to be included in the response, for example: ['Person.IDs', 'Persons.Salaries', 'HR.Employees']. An empty list means all entities are included.draft_entitiesdetermines whether the dependencies are for the draft or source entities.- The
page_sizeparameter specifies the maximum number of entities to return in the response. Default is 1000. The value must be between 1 and 1000. - The
page_tokenparameter should be filled with the value ofnext_page_tokenfrom the previous response. If not specified, the first page is returned.
The following code sample shows how to use curl to call the list_entities_and_dependencies MCP tool.
| Curl Request |
|---|
curl --location 'https://datamigration.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "list_entities_and_dependencies", "arguments": { // Provide these details according to the MCP tool specification. } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Request message for 'ListEntitiesDependencies' request.
ListEntitiesDependenciesRequest
| JSON representation |
|---|
{ "name": string, "draftEntities": boolean, "schemas": [ string ], "entitiesFullNames": [ string ], "pageSize": integer, "pageToken": string } |
| Fields | |
|---|---|
name |
Required. The resource name for the conversion workspace. Must be in the format |
draftEntities |
Required. Whether to get the dependency graph for the source entities or the destination (draft) entities. |
schemas[] |
Optional. An optional list of schemas to filter the dependency graph to. If empty, all schemas will be included. |
entitiesFullNames[] |
Optional. An optional list of entities to filter the dependency graph to. If empty, all entities will be included. |
pageSize |
Optional. The maximum number of entities to return. The service may return fewer entities than the value specifies. Default is 1000. |
pageToken |
Optional. The nextPageToken value received in the previous call to ListEntitiesDependencies, used in the subsequent request to retrieve the next page of results. On first call this should be left blank. When paginating, all other parameters provided must match the call that provided the page token, except for the page_size parameter. |
Output Schema
Response message for 'ListEntitiesDependencies' request.
ListEntitiesDependenciesResponse
| JSON representation |
|---|
{
"entities": [
{
object ( |
| Fields | |
|---|---|
entities[] |
Output only. The dependency information of the entities matching the request filter. |
nextPageToken |
Output only. A token which can be sent as |
EntityDependency
| JSON representation |
|---|
{ "sourceEntityId": { object ( |
| Fields | |
|---|---|
sourceEntityId |
The source entity id. |
draftEntityId |
The draft entity id. |
dependencies[] |
The direct dependencies of the entity. |
EntityId
| JSON representation |
|---|
{ "shortName": string, "type": enum ( |
| Fields | |
|---|---|
shortName |
The short name (e.g. table name) of the entity. |
type |
The type of the database entity (schema, table, view, index, ...). |
parentName |
The parent entity full name. |
parentType |
The type of the database entity (schema, table, view, ...). |
DatabaseEntityType
The type of database entities supported,
| Enums | |
|---|---|
DATABASE_ENTITY_TYPE_UNSPECIFIED |
Unspecified database entity type. |
DATABASE_ENTITY_TYPE_SCHEMA |
Schema. |
DATABASE_ENTITY_TYPE_TABLE |
Table. |
DATABASE_ENTITY_TYPE_COLUMN |
Column. |
DATABASE_ENTITY_TYPE_CONSTRAINT |
Constraint. |
DATABASE_ENTITY_TYPE_INDEX |
Index. |
DATABASE_ENTITY_TYPE_TRIGGER |
Trigger. |
DATABASE_ENTITY_TYPE_VIEW |
View. |
DATABASE_ENTITY_TYPE_SEQUENCE |
Sequence. |
DATABASE_ENTITY_TYPE_STORED_PROCEDURE |
Stored Procedure. |
DATABASE_ENTITY_TYPE_FUNCTION |
Function. |
DATABASE_ENTITY_TYPE_SYNONYM |
Synonym. |
DATABASE_ENTITY_TYPE_DATABASE_PACKAGE |
Package. |
DATABASE_ENTITY_TYPE_UDT |
UDT. |
DATABASE_ENTITY_TYPE_MATERIALIZED_VIEW |
Materialized View. |
DATABASE_ENTITY_TYPE_DATABASE |
Database. |
Tool Annotations
Tool annotations are sent to MCP clients to describe the basic risk of a given tool. Most clients treat these hints as untrusted, but they can be used to decide when a confirmation prompt might be sent to a user.
Along with the title string, the following boolean hints are defined as follows:
readOnlyHint: If true, the tool doesn't modify its environment. Default: false.destructiveHint: If true, then the tool can perform destructive actions. If false, then the tool can only perform additive actions. Default: true.idempotentHint: If true, then calling the tool repeatedly with the same arguments will have no additional effect on its environment. Default: false.openWorldHint: If true, then the tool can interact with an 'open world' of external entities. If false, then the tool can only interact with internal entities. For example, a web search tool would be open world, while a memory tool would not be open world.
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌