Skip to main content
Glama
langchain-ai

LangSmith MCP Server

Official
by langchain-ai

list_experiments

Retrieve and filter LangSmith experiment projects for model evaluation and comparison by specifying a dataset ID or name.

Instructions

List LangSmith experiment projects (reference projects) with mandatory dataset filtering.

Fetches experiment projects from LangSmith that are associated with a specific dataset. These are projects used for model evaluation and comparison. Requires either a dataset ID or dataset name to filter experiments.


🧩 PURPOSE

This function provides a convenient way to list and explore LangSmith experiment projects. It supports:

  • Filtering experiments by reference dataset (mandatory)

  • Filtering projects by name (partial match)

  • Limiting the number of results

  • Automatically extracting deployment IDs from nested project data

  • Returns simplified project information with key metrics (latency, cost, feedback stats)


⚙️ PARAMETERS

reference_dataset_id : str, optional The ID of the reference dataset to filter experiments by. Either this OR reference_dataset_name must be provided (but not both).

reference_dataset_name : str, optional The name of the reference dataset to filter experiments by. Either this OR reference_dataset_id must be provided (but not both).

limit : int, default 5 Maximum number of experiments to return. This can be adjusted by agents or users based on their needs.

project_name : str, optional Filter projects by name using partial matching. If provided, only projects whose names contain this string will be returned. Example: project_name="Chat" will match "Chat-LangChain", "ChatBot", etc.


📤 RETURNS

Dict[str, Any] A dictionary containing an "experiments" key with a list of simplified experiment project dictionaries:

```python
{
    "experiments": [
        {
            "name": "Experiment-Chat-LangChain",
            "experiment_id": "787d5165-f110-43ff-a3fb-66ea1a70c971",
            "feedback_stats": {...},  # Feedback statistics if available
            "latency_p50_seconds": 1.626,  # 50th percentile latency in seconds
            "latency_p99_seconds": 2.390,   # 99th percentile latency in seconds
            "total_cost": 0.00013005,       # Total cost in dollars
            "prompt_cost": 0.00002085,      # Prompt cost in dollars
            "completion_cost": 0.0001092,   # Completion cost in dollars
            "agent_deployment_id": "deployment-123"  # Only if available
        },
        ...
    ]
}
```

🧪 EXAMPLES

1️⃣ List experiments for a dataset by ID

experiments = list_experiments(reference_dataset_id="f5ca13c6-96ad-48ba-a432-ebb6bf94528f")

2️⃣ List experiments for a dataset by name

experiments = list_experiments(reference_dataset_name="my-dataset", limit=10)

3️⃣ Find experiments with specific name pattern

experiments = list_experiments(
    reference_dataset_id="f5ca13c6-96ad-48ba-a432-ebb6bf94528f",
    project_name="Chat",
    limit=1
)

🧠 NOTES FOR AGENTS

  • Returns simplified experiment information with key metrics (latency, cost, feedback stats)

  • The agent_deployment_id field is automatically extracted from nested project data when available, making it easy to identify agent deployments

  • Experiments are filtered to include only reference projects (associated with datasets)

  • The function uses name_contains for filtering, so partial matches work

  • You must provide either reference_dataset_id OR reference_dataset_name, but not both

  • Experiment projects are used for model evaluation and comparison across different runs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reference_dataset_idNo
reference_dataset_nameNo
limitNo
project_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description carries full burden and delivers comprehensive behavioral disclosure. It explains what the tool does (filters experiments by dataset, supports partial name matching, extracts deployment IDs), what it returns (simplified project information with key metrics), and operational constraints (mandatory dataset filtering, either/or parameter logic, default limit of 5). No contradictions exist since annotations are absent.

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 well-structured with clear sections (PURPOSE, PARAMETERS, RETURNS, EXAMPLES, NOTES) but could be more concise. Some information is repeated across sections (e.g., mandatory dataset filtering appears multiple times). However, every sentence adds value, and the structure helps agents quickly find relevant information.

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?

Given the tool's complexity (4 parameters, no annotations, 0% schema coverage) and presence of an output schema, the description provides complete context. It explains the tool's purpose, usage guidelines, parameter semantics, return format (with detailed example), and behavioral characteristics. The output schema existence means the description doesn't need to exhaustively document return values, but it still provides helpful context about what metrics are included.

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

Parameters5/5

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

With 0% schema description coverage, the description fully compensates by providing detailed parameter documentation. Each parameter gets clear explanations of purpose, constraints (e.g., 'either this OR reference_dataset_name must be provided'), defaults ('limit: int, default 5'), and examples. The description adds significant value beyond the bare schema, explaining the either/or relationship between dataset parameters and partial matching behavior for project_name.

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 clearly states the tool's purpose: 'List LangSmith experiment projects (reference projects) with mandatory dataset filtering.' It specifies the verb ('List'), resource ('LangSmith experiment projects'), and scope ('with mandatory dataset filtering'). It distinguishes from siblings like 'list_projects' by focusing specifically on experiment projects used for model evaluation.

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 provides explicit guidance on when to use this tool: 'Requires either a dataset ID or dataset name to filter experiments.' It distinguishes from alternatives by noting experiments are 'reference projects associated with datasets' and 'used for model evaluation and comparison.' The 'NOTES FOR AGENTS' section reinforces usage rules like mandatory dataset filtering.

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