Skip to main content
Glama

fetch_runs

Fetch and filter LangSmith run data by project, trace, type, error status, or FQL query. Automatic pagination handles large result sets.

Instructions

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, optional): Return only runs that belong to this trace. run_type (str, optional): Filter by type: "llm", "chain", "tool", "retriever". error (str, optional): "true" for errored runs, "false" for successful. is_root (str, optional): "true" for only top-level traces. filter (str, optional): Filter Query Language (FQL) expression. trace_filter (str, optional): Filter applied to the root run. tree_filter (str, optional): Filter applied to any run in the trace tree. order_by (str, optional): Sort field; prefix with "-" for descending. Default "-start_time". reference_example_id (str, optional): Filter runs by reference example ID. max_chars_per_page (int): Max chars per page, capped at 30000. Default 25000. preview_chars (int): Truncate long strings to this length. Default 150.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo"true" for errored runs, "false" for successful
limitYesMaximum number of runs to fetch from LangSmith API (capped at 100)
filterNoFilter Query Language (FQL) expression
is_rootNo"true" for only top-level traces
order_byNoSort field; prefix with '-' for descending-start_time
run_typeNoFilter by type: "llm", "chain", "tool", "retriever"
trace_idNoReturn only runs belonging to this trace UUID
page_numberNo1-based page index
tree_filterNoFilter applied to any run in the trace tree
project_nameYesThe project name to fetch runs from
trace_filterNoFilter applied to the root run in each trace tree
preview_charsNoTruncate long strings to this length
max_chars_per_pageNoMax character count per page, capped at 30000
reference_example_idNoFilter runs by reference example ID
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It thoroughly explains automatic pagination by character budget, caps on 'limit' (100) and 'max_chars_per_page' (30000), defaults, and the format for multiple projects (JSON array). This is rich contextual detail beyond a simple 'fetch runs' statement.

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 front-loaded with a concise summary and pagination note, followed by an organized Args list. It is lengthy due to 14 parameters but every sentence adds context (e.g., caps, defaults, usage hints). It does repeat schema descriptions somewhat, but it's structured efficiently for the complexity.

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 14 parameters, no output schema, and no annotations, the description is quite complete. It covers all parameters, filters, pagination, and defaults. The only gap is the lack of detail about the structure of returned runs, but since the focus is on invocation, this is acceptable and still highly informative.

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?

The input schema already covers all 14 parameters with descriptions, so the baseline is 3. The description adds extra value by clarifying the multi-project JSON array format for 'project_name', how 'page_number' interacts with 'total_pages', and how 'limit' relates to pagination. This goes beyond schema information.

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 action ('Fetch LangSmith runs'), the resource ('runs'), and scope ('one or more projects'), with additional features ('flexible filters and automatic pagination'). This distinguishes it from sibling tools such as list_projects or list_experiments, which target different resources.

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

Usage Guidelines4/5

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

The description provides clear context on how to use the tool, including pagination mechanics ('Use page_number and total_pages from the response to iterate through multiple pages'). However, it does not explicitly mention when to use this tool over alternatives or exclusions, so it falls short of a 5.

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/amitrechavia/langsmith-mcp-server-js'

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