MCP Tools Reference: datamigration

Tool: get_entity_info

Get details of the entity entity_name in the conversion workspace conversion_workspace. The entity_name parameter should be the full name of the entity, for example: 'Person.IDs'. The entity_type parameter should be the type of the entity, for example: 'DATABASE_ENTITY_TYPE_STORED_PROCEDURE', 'DATABASE_ENTITY_TYPE_TABLE', etc.

  • The conversion_workspace parameter is in the form: projects/{project name}/locations/{location}/conversionWorkspaces/{conversion_workspace}, for example: projects/my-project/locations/us-central1/conversionWorkspaces/my-conversion-workspace.

The following code sample shows how to use curl to call the get_entity_info 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": "get_entity_info",
    "arguments": {
      // Provide these details according to the MCP tool specification.
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'

Input Schema

Request message for 'GetEntityInfo' request.

GetEntityInfoRequest

JSON representation
{
  "conversionWorkspace": string,
  "draftTree": boolean,
  "entityName": string,
  "entityType": enum (DatabaseEntityType)
}
Fields
conversionWorkspace

string

Required. Name of the conversion workspace resource in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.

draftTree

boolean

Required. Whether the provided entity name refers to the draft name or the source name. If false, the source name will be used.

entityName

string

Required. The entity full name from the tree.

entityType

enum (DatabaseEntityType)

Required. The type of the database entity (table, view, index, ...).

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.

Output Schema

Response message for 'GetEntityInfo' request.

GetEntityInfoResponse

JSON representation
{
  "sourceEntityName": string,
  "sourceEntityType": enum (DatabaseEntityType),
  "draftEntityName": string,
  "draftEntityType": enum (DatabaseEntityType),
  "sourceDdl": string,
  "deterministicDdl": string,
  "editedDdl": string,
  "aiDdl": string,
  "aiSummary": string,
  "applyDdlKind": enum (DdlKind)
}
Fields
sourceEntityName

string

The entity full name from the SOURCE tree.

sourceEntityType

enum (DatabaseEntityType)

The type of the source database entity (table, view, index, ...).

draftEntityName

string

This is the entity full name of the DRAFT entity, if the entity was converted.

draftEntityType

enum (DatabaseEntityType)

The type of the draft database entity (table, view, index, ...).

sourceDdl

string

The source DDL of the entity.

deterministicDdl

string

The deterministic converted DDL of the entity.

editedDdl

string

The user edited DDL of the entity.

aiDdl

string

The AI generated DDL of the entity.

aiSummary

string

The AI generated summary of the AI DDL.

applyDdlKind

enum (DdlKind)

Which DDL to use when applying.

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.

DdlKind

The type of DDL

Enums
DDL_KIND_UNSPECIFIED The kind of the DDL is unknown.
SOURCE DDL of the source entity
DETERMINISTIC Deterministic converted DDL
AI Gemini AI converted DDL
USER_EDIT User edited DDL

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: ❌