Skip to main content
Glama

Read Dataset

read_dataset
Read-only

Read paginated records from local SAS datasets using offset and limit, with optional column selection, pandas-style filtering, and value-label decoding for accurate data inspection.

Instructions

按 offset/limit 分页读取记录(records 为 JSON,NaN 为 null,日期为 ISO 字符串)。

Input Schema

NameRequiredDescriptionDefault
pathYes数据集路径,相对 SAS_DATA_ROOT 或绝对路径。
limitNo返回行数(默认 20,上限 SAS_LOCAL_MCP_MAX_ROWS)。
whereNo可选,pandas 查询表达式,如 "AGE > 18" 或 "SEX == 'F'"。
offsetNo起始行号(默认 0)。用于翻到数据中部/尾部取样, 避免只看前几行(临床数据常是同一受试者)造成误判。
columnsNo可选,只返回这些变量。
apply_labelsNo为 True 时把 coded 值替换为 SAS 值标签文本。

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, non-destructive, closed-world). The description adds real value beyond them: records are returned as JSON, NaN becomes null, dates are ISO strings. It omits row-cap/limit enforcement behavior, but the schema's limit field documents the SAS_LOCAL_MCP_MAX_ROWS cap.

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

Conciseness5/5

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

A single sentence, front-loaded with the pagination purpose and followed by a compact parenthetical on serialization quirks. Nothing is wasted and no filler precedes the core statement.

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

Completeness3/5

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

An output schema exists, so return values need not be explained, and serialization behavior is covered. The missing piece is tool selection guidance versus the other read/query siblings, which matters for a six-parameter read tool in a crowded family.

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 all six parameters are already documented, including the rationale for offset sampling and the where-expression syntax. The description only echoes offset/limit pagination, adding no syntax or edge-case detail beyond the schema; baseline 3 applies.

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

Purpose4/5

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

States a specific verb (读取/read) and resource (records from a dataset) and mentions pagination via offset/limit. It does not differentiate itself from siblings like query_dataset or summarize_dataset, so an agent cannot tell from the description alone which read tool to pick.

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 statement of when to use this versus query_dataset, summarize_dataset, or frequency. Pagination is implied as the purpose, but there are no exclusions or alternative-routing guidance anywhere in the description.

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