Skip to main content
Glama
langchain-ai

LangSmith MCP Server

Official
by langchain-ai

read_dataset

Retrieve dataset details from LangSmith by providing either a dataset ID or name for analysis and integration.

Instructions

Read a specific dataset from LangSmith.

Note: Either dataset_id or dataset_name must be provided to identify the dataset. If both are provided, dataset_id takes precedence.

Args: dataset_id (Optional[str]): Dataset ID to retrieve dataset_name (Optional[str]): Dataset name to retrieve ctx: FastMCP context (automatically provided)

Returns: Dict[str, Any]: Dictionary containing the dataset details, or an error message if the dataset cannot be retrieved

Example in case you need to create a separate python script to read a dataset: ```python from langsmith import Client

client = Client()
dataset = client.read_dataset(dataset_name="My Dataset")
# Or by ID:
# dataset = client.read_dataset(dataset_id="dataset-id-here")
```

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataset_idNo
dataset_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool reads a dataset and returns details or an error, but lacks behavioral traits like authentication needs, rate limits, or whether it's idempotent. The example adds some context but doesn't fully compensate for missing annotations.

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

Conciseness3/5

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

The description is front-loaded with the core purpose, but includes an extensive example that may be redundant for an AI agent. The structure is somewhat cluttered with notes and code, reducing efficiency. Every sentence doesn't fully earn its place, as the example could be trimmed or omitted.

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

Completeness4/5

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

Given the tool's moderate complexity (2 parameters, no annotations, but has an output schema), the description is fairly complete. It covers the purpose, parameter usage, and return behavior. The output schema exists, so explaining return values isn't needed, but it could benefit from more behavioral context (e.g., error handling details).

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate. It clearly explains the semantics of both parameters: 'dataset_id' and 'dataset_name' are for identifying the dataset, with precedence rules. This adds significant value beyond the bare schema, though it doesn't detail format constraints (e.g., string patterns).

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?

The description clearly states the tool's purpose: 'Read a specific dataset from LangSmith.' It uses a specific verb ('Read') and resource ('dataset'), making the action clear. However, it doesn't explicitly differentiate from sibling tools like 'list_datasets' or 'read_example', which would require a 5.

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

Usage Guidelines3/5

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

The description provides implied usage guidance by noting that either 'dataset_id' or 'dataset_name' must be provided, with 'dataset_id' taking precedence if both are given. However, it lacks explicit when-to-use vs. alternatives (e.g., compared to 'list_datasets' for browsing datasets), and no exclusions or prerequisites are mentioned.

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/langchain-ai/langsmith-mcp-server'

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