Data Tools

"Data Tools" cover image - 2 hands, one robot, one man, touching a floating screen with data

Describe the data

Understand the data available to query

The Describe the Data tool returns the column names and data types of the specified report storage table. Call this first so you know what columns are available before querying the specific report storage table.

Tool Name

Tool Functionality

Inputs

Outputs

Example Prompt

describe_data

  • Uses the function Get the Table Schema to know what data is available before querying the report data

Report storage table name

Column names and data types

"What kind of data can the wireless inventory report provide?"


Preview the Data

Understand the data format

The Preview the Data tool returns the first 5 rows from the specified report storage table so the AI can understand the data format and typical values before constructing a query.  Call this second so you know what data is stored in the columns available, before querying the specific report storage table.

Tool Name

Tool Functionality

Inputs

Outputs

Example Prompt

preview_data

  • Uses the function Sample the Report Table to generate a sampling of data

Report storage table name

5-row table with the report structure and sample data

"What is the structure of a wireless inventory report?"


Query the data

Query the report data

The Query the Data tool executes a read-only SQL SELECT statement against the database for the specified report table returns the result set. Only SELECT statements are allowed.

Tool Name

Tool Functionality

Inputs

Outputs

Example Prompt

query_data_for_specified_report

  • Uses the function Query the Report Table
  • Special code validation to make sure only a SQL SELECT is sent as input.
  • Uses a read-only DB connection.
  • Validates the user's allowed DB connection and allowed table access

  • Report storage table name
  • Query

Query result set