Skip to content

AI agent uses raw SQL queries instead of deployment show for checking import status #114

@TomProkop

Description

@TomProkop

Problem

When the Copilot CLI agent needs to check the status of a solution import, it composes raw SQL queries against the asyncoperation table instead of using the existing txc env deployment show command.

# What the agent did (wrong):
txc env data query sql "SELECT statuscode, message FROM asyncoperation WHERE asyncoperationid = '...'"

# What it should have done:
txc env deployment show --async-operation-id ...
# or:
txc env deployment show --solution-name FlowTest7
# or:
txc env deployment show --latest

Root cause

The deployment show command was not discoverable enough for the AI agent. The agent knew about the data query sql command and composed a direct query instead of using the purpose-built deployment inspection command.

Impact

  • The SQL query approach requires knowledge of Dataverse internals (asyncoperation table schema)
  • The raw SQL output is unstructured — the agent had to parse error XML from the message column
  • deployment show provides structured, human-readable output with proper error formatting

Suggested improvements

  1. Improve the deployment show description for better MCP/LLM discoverability — mention it shows import/export status and errors
  2. Consider making the solution import command output include a hint like 'Use deployment show --async-operation-id ... to check status'
  3. The MCP guide/reasoning engine could map 'check import status' to deployment show

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions