Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LANGSMITH_API_KEY | Yes | Your LangSmith API key for authentication | |
| LANGSMITH_ENDPOINT | No | Custom API endpoint URL (for self-hosted or EU region) | https://api.smith.langchain.com |
| LANGSMITH_WORKSPACE_ID | No | Workspace ID for API keys scoped to multiple workspaces |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_prompts | Fetch prompts from LangSmith with optional filtering. Args: is_public (str): Filter by prompt visibility - "true" for public prompts, "false" for private prompts (default: "false") limit (int): Maximum number of prompts to return (default: 20) Returns: Dict[str, Any]: Dictionary containing the prompts and metadata |
| get_prompt_by_name | Get a specific prompt by its exact name. Args: prompt_name (str): The exact name of the prompt to retrieve ctx: FastMCP context (automatically provided) Returns: Dict[str, Any]: Dictionary containing the prompt details and template, or an error message if the prompt cannot be found |
| push_prompt | Call this tool when you need to understand how to create and push prompts to LangSmith. |
| fetch_runs | Fetch LangSmith runs (traces, tools, chains, etc.) from one or more projects using flexible filters, query language expressions, and trace-level constraints. π§© PURPOSEThis is a general-purpose LangSmith run fetcher designed for analytics, trace export, and automated exploration. It wraps
It returns raw suitable for further analysis or export. βοΈ PARAMETERSproject_name : str The project name to fetch runs from. For multiple projects, use JSON array string (e.g., '["project1", "project2"]'). trace_id : str, optional Return only runs that belong to a specific trace tree. It is a UUID string, e.g. "123e4567-e89b-12d3-a456-426614174000". run_type : str, optional Filter runs by type (e.g. "llm", "chain", "tool", "retriever"). error : str, optional Filter by error status: "true" for errored runs, "false" for successful runs. is_root : str, optional Filter root traces: "true" for only top-level traces, "false" to exclude roots. If not provided, returns all runs. filter : str, optional A Filter Query Language (FQL) expression that filters runs by fields, metadata, tags, feedback, latency, or time. trace_filter : str, optional Filter applied to the root run in each trace tree. Lets you select child runs based on root attributes or feedback. tree_filter : str, optional
Filter applied to any run in the trace tree (including siblings or children).
Example:
order_by : str, default "-start_time" Sort field; prefix with "-" for descending order. limit : int, default 50 Maximum number of runs to return. reference_example_id : str, optional Filter runs by reference example ID. Returns only runs associated with the specified dataset example ID. format_type : str, default "pretty"
Output format for extracted messages. Options:
- π€ RETURNSDict[str, Any]
Dictionary containing:
- If format_type is set: π§ͺ EXAMPLES1οΈβ£ Get latest 10 root runs 2οΈβ£ Get all tool runs that errored 3οΈβ£ Get all runs that took >5s and have tag "experimental" 4οΈβ£ Get all runs in a specific conversation thread 5οΈβ£ List all runs called "extractor" whose root trace has feedback user_score=1 6οΈβ£ List all runs that started after a timestamp and either errored or got low feedback 7οΈβ£ Get formatted messages for conversational AI (default: pretty format) 8οΈβ£ Get messages in JSON format π§ NOTES FOR AGENTS
|
| list_projects | List LangSmith projects with optional filtering and detail level control. Fetches projects from LangSmith, optionally filtering by name and controlling the level of detail returned. Can return either simplified project information or full project details. In case a dataset id or name is provided, you don't need to provide a project name. π§© PURPOSEThis function provides a convenient way to list and explore LangSmith projects. It supports:
βοΈ PARAMETERSlimit : int, default 5 Maximum number of projects to return (as string, e.g., "5"). 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: more_info : str, default "false"
Controls the level of detail returned:
- reference_dataset_id : str, optional
The ID of the reference dataset to filter projects by.
Either this OR reference_dataset_name : str, optional
The name of the reference dataset to filter projects by.
Either this OR π€ RETURNSList[dict]
A list of project dictionaries. The structure depends on π§ͺ EXAMPLES1οΈβ£ List first 5 projects (simplified) 2οΈβ£ Search for projects with "Chat" in the name 3οΈβ£ Get full project details 4οΈβ£ Find a specific project with full details π§ NOTES FOR AGENTS
|
| list_experiments | 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. π§© PURPOSEThis function provides a convenient way to list and explore LangSmith experiment projects. It supports:
βοΈ PARAMETERSreference_dataset_id : str, optional
The ID of the reference dataset to filter experiments by.
Either this OR reference_dataset_name : str, optional
The name of the reference dataset to filter experiments by.
Either this OR 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: π€ RETURNSDict[str, Any] A dictionary containing an "experiments" key with a list of simplified experiment project dictionaries: π§ͺ EXAMPLES1οΈβ£ List experiments for a dataset by ID 2οΈβ£ List experiments for a dataset by name 3οΈβ£ Find experiments with specific name pattern π§ NOTES FOR AGENTS
|
| list_datasets | Fetch LangSmith datasets. Note: If no arguments are provided, all datasets will be returned. Args: dataset_ids (Optional[str]): Dataset IDs to filter by as JSON array string (e.g., '["id1", "id2"]') or single ID data_type (Optional[str]): Filter by dataset data type (e.g., 'chat', 'kv') dataset_name (Optional[str]): Filter by exact dataset name dataset_name_contains (Optional[str]): Filter by substring in dataset name metadata (Optional[str]): Filter by metadata as JSON object string (e.g., '{"key": "value"}') limit (int): Max number of datasets to return (default: 20) ctx: FastMCP context (automatically provided) Returns: Dict[str, Any]: Dictionary containing the datasets and metadata, or an error message if the datasets cannot be retrieved |
| list_examples | 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 |
| read_dataset | 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 |
| read_example | Read a specific example from LangSmith. Args: example_id (str): Example ID to retrieve as_of (Optional[str]): Dataset version tag OR ISO timestamp to retrieve the example as of that version/time ctx: FastMCP context (automatically provided) Returns: Dict[str, Any]: Dictionary containing the example details, or an error message if the example cannot be retrieved Example in case you need to create a separate python script to read an example: ```python from langsmith import Client |
| create_dataset | Call this tool when you need to understand how to create datasets in LangSmith. |
| update_examples | Call this tool when you need to understand how to update dataset examples in LangSmith. |
| run_experiment | Call this tool when you need to understand how to run experiments and evaluations in LangSmith. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |