Skip to main content
Glama
us-all

openmetadata-mcp-server

by us-all

get-table-sample-data-by-name

Get a preview of table data by specifying the fully qualified name. Returns sample rows for inspection.

Instructions

Get sample data rows for a table by fully qualified name

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fqnYesFully qualified table name (e.g. 'service.database.schema.tableName')

Implementation Reference

  • The handler function that executes the 'get-table-sample-data-by-name' tool: looks up the table by its fully qualified name (FQN) via OpenMetadata's /tables/name endpoint to get its UUID, then fetches sample data from /tables/{id}/sampleData.
    export async function getTableSampleDataByName(params: z.infer<typeof getTableSampleDataByNameSchema>) {
      const entity = await omClient.get<{ id: string }>(`/tables/name/${encodeURIComponent(params.fqn)}`, { fields: "id" });
      return omClient.get(`/tables/${entity.id}/sampleData`);
    }
  • Zod schema defining the single required input parameter 'fqn' (fully qualified table name, e.g. 'service.database.schema.tableName').
    export const getTableSampleDataByNameSchema = z.object({
      fqn: z.string().describe("Fully qualified table name (e.g. 'service.database.schema.tableName')"),
    });
  • src/index.ts:424-425 (registration)
    Registration of the tool via the `tool()` call, mapping the name 'get-table-sample-data-by-name' to its schema and handler function, wrapped with error handling.
    tool("get-table-sample-data", "Get sample data rows for a table by UUID (use this instead of querying BigQuery directly)", getTableSampleDataSchema.shape, wrapToolHandler(getTableSampleData));
    tool("get-table-sample-data-by-name", "Get sample data rows for a table by fully qualified name", getTableSampleDataByNameSchema.shape, wrapToolHandler(getTableSampleDataByName));
  • src/index.ts:126-133 (registration)
    Import of the schema and handler from src/tools/sample-data.js into the main entry point.
    import {
      getTableSampleDataSchema, getTableSampleData,
      getTableSampleDataByNameSchema, getTableSampleDataByName,
      getTopicSampleDataSchema, getTopicSampleData,
      getTopicSampleDataByNameSchema, getTopicSampleDataByName,
      getContainerSampleDataSchema, getContainerSampleData,
      getContainerSampleDataByNameSchema, getContainerSampleDataByName,
    } from "./tools/sample-data.js";
  • Reference to the tool in the 'data-contract-bootstrap' prompt, instructing the LLM to call 'get-table-sample-data-by-name' to pull sample data for schema inference.
    ? "4. Pull sample data: `get-table-sample-data-by-name` with fqn=" + JSON.stringify(tableFqn) + ", limit=100. Use it to *infer* schema rules (do not promise them as truth):\n   - column has zero nulls in sample → suggest `required: true` (NOT NULL).\n   - numeric column min/max range → suggest `range` quality rule with the observed bounds + 20% padding.\n   - string column distinct values < 20 → suggest `enum` rule with the distinct values.\n   - all rows match a regex (email/url/uuid/iso-date) → suggest `pattern` rule.\n   Mark each inferred rule as **inferred** in the output so the reviewer can tighten them."
Behavior2/5

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

No annotations provided, so description carries full burden. It only states it 'gets' data, implying read-only, but provides no details on limits, ordering, authentication needs, rate limits, or whether it returns all rows or a fixed sample. Minimal behavioral disclosure.

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?

Single sentence, no fluff, front-loaded with purpose. Could include slightly more context without becoming verbose, but overall concise.

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

Completeness2/5

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

Given simplicity (1 param, no output schema), description lacks usage guidelines and behavioral context. Agent cannot distinguish from related tools or understand output without additional info. Incomplete for effective tool selection.

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 coverage is 100% with a clear description for the single parameter fqn. Description adds no extra meaning beyond the schema; baseline of 3 is appropriate.

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?

Description clearly states 'Get sample data rows for a table by fully qualified name', specifying the action, resource, and key distinction of using fully qualified name. This differentiates from sibling tools like get-table-sample-data and get-table-by-name.

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

Usage Guidelines2/5

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

No guidance on when to use this tool vs alternatives; no mention of context, prerequisites (e.g., table must exist), or when to prefer this over get-table-sample-data or other get tools. Missing entirely.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/us-all/openmetadata-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server