list_examples
Retrieve dataset examples from LangSmith with filtering by ID, metadata, splits, or version to support data analysis and model evaluation workflows.
Instructions
Fetch examples from a LangSmith dataset with advanced filtering options.
Note: Either dataset_id, dataset_name, or example_ids must be provided. If multiple are provided, they are used in order of precedence: example_ids, dataset_id, dataset_name.
Args: dataset_id (Optional[str]): Dataset ID to retrieve examples from dataset_name (Optional[str]): Dataset name to retrieve examples from example_ids (Optional[str]): Specific example IDs as JSON array string (e.g., '["id1", "id2"]') or single ID limit (int): Maximum number of examples to return (default: 10) offset (int): Number of examples to skip (default: 0) filter (Optional[str]): Filter string using LangSmith query syntax (e.g., 'has(metadata, {"key": "value"})') metadata (Optional[str]): Metadata to filter by as JSON object string (e.g., '{"key": "value"}') splits (Optional[str]): Dataset splits as JSON array string (e.g., '["train", "test"]') or single split inline_s3_urls (Optional[str]): Whether to inline S3 URLs: "true" or "false" (default: SDK default if not specified) include_attachments (Optional[str]): Whether to include attachments: "true" or "false" (default: SDK default if not specified) as_of (Optional[str]): Dataset version tag OR ISO timestamp to retrieve examples as of that version/time ctx: FastMCP context (automatically provided)
Returns: Dict[str, Any]: Dictionary containing the examples and metadata, or an error message if the examples cannot be retrieved
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dataset_id | No | ||
| dataset_name | No | ||
| example_ids | No | ||
| filter | No | ||
| metadata | No | ||
| splits | No | ||
| inline_s3_urls | No | ||
| include_attachments | No | ||
| as_of | No | ||
| limit | No | ||
| offset | No |