Skip to main content
Glama
Teradata

Teradata MCP Server

Official
by Teradata

Dba Usersqllist

dba_userSqlList
Read-onlyIdempotent

Retrieve SQL statements executed by a specified user to see what queries a particular account has run, with an optional lookback period.

Instructions

Retrieve SQL statements executed by a specific named user. Use when the user asks what queries a particular person or account has been running. ONLY call when the user has explicitly named a specific user account — if no user name appears in the message, ask for clarification. NEVER call with an empty user_name. Do NOT use for SQL history by table — use dba_tableSqlList when the user asks about queries against a specific table.

Arguments: user_name - User name to filter by. Required — do not pass empty string. no_days - Number of days to look back persist - If True, materializes result as a volatile table and returns table name

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
no_daysNoNumber of days to look back
persistNoIf True, materializes result as a volatile table and returns table name
user_nameYesUser name to filter by. Required — do not pass empty string.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.0.1
    • removedInput schema / properties / user_name / default
      Removed value: -""
    • changedInput schema / properties / user_name / description
      Previous value: -"User name filter. Leave empty or omit for all users."New value: +"User name to filter by. Required — do not pass empty string."
    • addedInput schema / required
      Added value: +[
      +  "user_name"
      +]
  2. Changed10 schema fields changedv0.2.1
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / no_days / anyOf
      Removed value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / no_days / description
      Added value: +"Number of days to look back"
    • removedInput schema / properties / no_days / title
      Removed value: -"No Days"
    • addedInput schema / properties / no_days / type
      Added value: +"integer"
    • addedInput schema / properties / persist
      Added value: +{
      +  "default": false,
      +  "description": "If True, materializes result as a volatile table and returns table name",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / user_name / default
      Added value: +""
    • addedInput schema / properties / user_name / description
      Added value: +"User name filter. Leave empty or omit for all users."
    • removedInput schema / properties / user_name / title
      Removed value: -"User Name"
    • removedInput schema / required
      Removed value: -[
      -  "user_name"
      -]
  3. Changed1 schema field changedv1.0.0
    • removedInput schema / title
      Removed value: -"handle_dba_userSqlListArguments"
  4. First observed

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint and idempotentHint, and the description adds meaningful behavioral detail beyond them: it warns against empty user_name, instructs the agent to ask for clarification when no user is named, and discloses that persist=True materializes a volatile table and returns its name. This is useful, non-obvious behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact, front-loaded with the core behavior, and uses structured argument notes. The Arguments block partly duplicates the input schema, but it is brief and earns its place by emphasizing the required user_name constraint and the persist side effect.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 3-parameter tool with full schema coverage and no output schema, this description is complete. It covers purpose, invocation conditions, exclusions, an alternative tool, required parameter behavior, and the main optional side effect. An agent has enough context to decide when and how to call it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all three parameters. The description restates those descriptions and adds the 'do not pass empty string' guard, but it does not add substantially new semantic detail such as value formats, bounds, or examples.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Retrieve SQL statements executed by a specific named user.' It clearly distinguishes this tool from dba_tableSqlList, which handles SQL history by table, and from the other siblings by anchoring on a named user account.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit when-to-use guidance (user asks what queries a person/account has been running), a hard precondition (must name a specific user, otherwise ask for clarification), and an explicit alternative: use dba_tableSqlList for table-focused SQL history. This leaves little ambiguity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.