langsmith-mcp-server

v0.1.7
langsmith-mcp-server Checked 2 hours ago Published 9 months ago

LangSmith MCP Server - TypeScript implementation

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

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 with prompts and metadata

ParameterTypeDescription
is_publicstringFilter by prompt visibility - "true" for public prompts, "false" for private prompts
limitnumberMaximum number of prompts to return

get_prompt_by_name

Get a specific prompt by its exact name. Args: prompt_name (str): The exact name of the prompt to retrieve Returns: Dict containing the prompt details and template, or an error message

ParameterTypeDescription
prompt_name *stringThe exact name of the prompt to retrieve

push_prompt

Call this tool when you need to understand how to create and push prompts to LangSmith. This is a documentation-only tool that explains how to: - Create prompts using LangChain's prompt templates - Push prompts to LangSmith for version control and management - Handle prompt creation vs. version updates Use the LangSmith Client's push_prompt() method. See LangSmith documentation for details.

get_thread_history

Retrieve one page of message history for a specific conversation thread. Uses char-based pagination: pages are built by character budget (max_chars_per_page). Long strings are truncated to preview_chars. Supply page_number (1-based) on every call; use the returned total_pages to request further pages. Args: thread_id (str): The unique ID of the thread to fetch history for project_name (str): The name of the project containing the thread page_number (int): 1-based page index (required) max_chars_per_page (int): Max character count per page, capped at 30000 (default: 25000) preview_c…

ParameterTypeDescription
page_number *number1-based page index (required)
project_name *stringThe name of the project containing the thread
thread_id *stringThe unique ID of the thread to fetch history for
max_chars_per_pagenumberMax character count per page, capped at 30000
preview_charsnumberTruncate long strings to this length

fetch_runs

Fetch LangSmith runs from one or more projects with flexible filters and automatic pagination. All results are paginated by character budget to keep responses manageable. Use page_number and total_pages from the response to iterate through multiple pages. Args: project_name (str): The project name. For multiple projects, use JSON array string. limit (int): Max runs to fetch from LangSmith API (capped at 100). These runs are then paginated by character budget into pages. page_number (int): 1-based page index. Use with total_pages from response to iterate through pages. trace_id (str,…

ParameterTypeDescription
limit *numberMaximum number of runs to fetch from LangSmith API (capped at 100)
project_name *stringThe project name to fetch runs from
errorstring"true" for errored runs, "false" for successful
filterstringFilter Query Language (FQL) expression
is_rootstring"true" for only top-level traces
max_chars_per_pagenumberMax character count per page, capped at 30000
order_bystringSort field; prefix with '-' for descending
page_numbernumber1-based page index
preview_charsnumberTruncate long strings to this length
reference_example_idstringFilter runs by reference example ID
run_typestringFilter by type: "llm", "chain", "tool", "retriever"
trace_filterstringFilter applied to the root run in each trace tree
trace_idstringReturn only runs belonging to this trace UUID
tree_filterstringFilter applied to any run in the trace tree

list_projects

List LangSmith projects with optional filtering and detail level control. Args: limit (int): Maximum number of projects to return (default: 5) project_name (str, optional): Filter projects by name (partial match) more_info (str): "true" for full details, "false" for simplified (default: "false") reference_dataset_id (str, optional): Filter by reference dataset ID reference_dataset_name (str, optional): Filter by reference dataset name

ParameterTypeDescription
limitnumberMaximum number of projects to return
more_infostring"true" for full details, "false" for simplified
project_namestringFilter projects by name using partial matching
reference_dataset_idstringFilter by reference dataset ID
reference_dataset_namestringFilter by reference dataset name

get_billing_usage

Fetch organization billing usage (trace counts) with workspace names inline. Args: starting_on (str): Start of date range (ISO 8601) ending_before (str): End of date range (ISO 8601) workspace (str, optional): Optional workspace UUID or display name to filter on_current_plan (str): "true" to include only usage on current plan (default: "true")

ParameterTypeDescription
ending_before *stringEnd of date range (ISO 8601)
starting_on *stringStart of date range (ISO 8601)
on_current_planstring"true" to include only usage on current plan
workspacestringOptional workspace UUID or display name to filter

list_experiments

List LangSmith experiment projects (reference projects) with mandatory dataset filtering. Requires either reference_dataset_id or reference_dataset_name. Args: reference_dataset_id (str, optional): Dataset ID to filter experiments by reference_dataset_name (str, optional): Dataset name to filter experiments by limit (int): Maximum number of experiments to return (default: 5) project_name (str, optional): Filter by name (partial match)

ParameterTypeDescription
limitnumberMaximum number of experiments to return
project_namestringFilter projects by name using partial matching
reference_dataset_idstringThe ID of the reference dataset to filter experiments by
reference_dataset_namestringThe name of the reference dataset to filter experiments by

list_datasets

Fetch LangSmith datasets. If no arguments are provided, all datasets will be returned. Args: dataset_ids (str, optional): Dataset IDs as JSON array string or single ID data_type (str, optional): Filter by dataset data type (e.g., 'chat', 'kv') dataset_name (str, optional): Filter by exact dataset name dataset_name_contains (str, optional): Filter by substring in dataset name metadata (str, optional): Filter by metadata as JSON object string limit (int): Max number of datasets to return (default: 20)

ParameterTypeDescription
data_typestringFilter by dataset data type
dataset_idsstringDataset IDs as JSON array string or single ID
dataset_namestringFilter by exact dataset name
dataset_name_containsstringFilter by substring in dataset name
limitnumberMax number of datasets to return
metadatastringFilter by metadata as JSON object string

list_examples

Fetch examples from a LangSmith dataset with advanced filtering options. Either dataset_id, dataset_name, or example_ids must be provided. Args: dataset_id (str, optional): Dataset ID to retrieve examples from dataset_name (str, optional): Dataset name to retrieve examples from example_ids (str, optional): Example IDs as JSON array string or single ID filter (str, optional): Filter string using LangSmith query syntax metadata (str, optional): Metadata filter as JSON object string splits (str, optional): Dataset splits as JSON array string or single split inline_s3_urls (str, op…

ParameterTypeDescription
as_ofstringDataset version tag or ISO timestamp
dataset_idstringDataset ID to retrieve examples from
dataset_namestringDataset name to retrieve examples from
example_idsstringExample IDs as JSON array string or single ID
filterstringFilter string using LangSmith query syntax
include_attachmentsstring"true" or "false"
inline_s3_urlsstring"true" or "false"
limitnumberMaximum number of examples to return
metadatastringMetadata filter as JSON object string
offsetstringNumber of examples to skip
splitsstringDataset splits as JSON array string or single split

read_dataset

Read a specific dataset from LangSmith. Either dataset_id or dataset_name must be provided. Args: dataset_id (str, optional): Dataset ID to retrieve dataset_name (str, optional): Dataset name to retrieve

ParameterTypeDescription
dataset_idstringDataset ID to retrieve
dataset_namestringDataset name to retrieve

read_example

Read a specific example from LangSmith. Args: example_id (str): Example ID to retrieve as_of (str, optional): Dataset version tag or ISO timestamp

ParameterTypeDescription
example_id *stringExample ID to retrieve
as_ofstringDataset version tag or ISO timestamp

create_dataset

Call this tool when you need to understand how to create datasets in LangSmith. This is a documentation-only tool.

update_examples

Call this tool when you need to understand how to update dataset examples in LangSmith. This is a documentation-only tool.

run_experiment

Call this tool when you need to understand how to run experiments and evaluations in LangSmith. This is a documentation-only tool.