/ Directory / Playground / langsmith-fetch-skill
● Community OthmanAdi ⚡ Instant

langsmith-fetch-skill

by OthmanAdi · OthmanAdi/langsmith-fetch-skill

Debug LangChain / LangGraph agents from your terminal — fetches LangSmith Studio traces into Claude Code and analyzes failures, latency, tool calls.

A focused observability skill. When you ask Claude to debug an agent, it runs langsmith-fetch against LangSmith Studio, pulls trace data, analyzes execution patterns, and surfaces failures, root causes, latency hotspots, and tool-call issues. Export sessions for later review.

Why use it

Key features

Live Demo

What it looks like in practice

langsmith-fetch-skill.replay ▶ ready
0/0

Install

Author repository · Claude Skills documentation

Use Cases

Real-world ways to use langsmith-fetch-skill

Diagnose a slow agent without opening LangSmith UI

👤 LangChain/LangGraph devs ⏱ ~20 min intermediate

When to use: An agent that used to be snappy is now slow; you want root cause.

Flow
  1. Ask Claude to diagnose
    Why is my agent <name> slow? Pull the last 20 traces from LangSmith and find the hotspot.✓ Copied
    → Skill fetches traces; reports latency by step
  2. Drill in
    Focus on trace <id> — break down tool-call times.✓ Copied
    → Per-tool latency with the outlier called out

Outcome: A specific step to optimize, not a hunch.

Pitfalls
  • Optimizing the average when tail latency is the problem — Ask for p95/p99 specifically
Combine with: filesystem

Root-cause an agent failure from a trace id

👤 Anyone running LangGraph in production ⏱ ~15 min intermediate

When to use: A user reported an error; you have the trace id.

Flow
  1. Fetch + analyze
    Debug trace <id>. What was the immediate error, what's the root cause in the graph?✓ Copied
    → Error step + upstream decision that led to it

Outcome: A fix targeting the actual decision point, not the symptom.

Find which node burns the most tokens

👤 Teams optimizing LLM spend ⏱ ~30 min intermediate

When to use: Monthly review of agent spend.

Flow
  1. Aggregate token usage
    Across last 7 days' traces, rank graph nodes by total token usage.✓ Copied
    → Ranked table with % share
  2. Propose tightening
    For the top 3, propose prompt-compression or model downgrade options.✓ Copied
    → Targeted opt list

Outcome: Measurable spend reduction without chasing tiny savings.

Combinations

Pair with other MCPs for X10 leverage

langsmith-fetch-skill + filesystem

Save exports alongside the agent code for lineage

Export the debugging session to debugging/traces/<date>.json.✓ Copied
langsmith-fetch-skill + github

Attach trace summary to a bug report

Summarize trace <id> and post as comment on GitHub issue #42.✓ Copied

Tools

What this MCP exposes

ToolInputsWhen to callCost
fetch_recent project, limit Broad diagnosis LangSmith quota
fetch_trace trace_id Deep dive on one run LangSmith quota
analyze_failures traces Post-fetch analysis 0
export_session traces Archive for later 0

Cost & Limits

What this costs to run

API quota
LangSmith: depends on plan; Studio has generous quotas
Tokens per call
Low — traces are structured
Monetary
Free skill; LangSmith free tier covers most devs
Tip
Use fetch_recent with a narrow window, not full history

Security

Permissions, secrets, blast radius

Minimum scopes: LangSmith: read on your project(s)
Credential storage: LANGCHAIN_API_KEY in env
Data egress: Only to LangSmith (where the traces already live)
Never grant: Write to LangSmith — skill only reads

Troubleshooting

Common errors and fixes

langsmith-fetch: command not found

Install LangSmith CLI or ensure it's on PATH

Verify: which langsmith-fetch
Empty results

Check project name and time window; traces are project-scoped

Alternatives

langsmith-fetch-skill vs others

AlternativeWhen to use it insteadTradeoff
LangSmith web UIYou prefer clickingNo Claude analysis

More

Resources

📖 Read the official README on GitHub

🐙 Browse open issues

🔍 Browse all 400+ MCP servers and Skills

Continue exploring

Related tools and workflows

Choose another guide for your workflow, or explore a collection.

Shared context · langchain

LangChain Skills

Build agents with LangChain, LangGraph, and Deep Agents using the framework publisher’s setup, architecture, persistence, RAG, and evaluation guidance.

Skill

Shared context · langsmith

LangSmith Skills

Inspect LLM application traces, build evaluation datasets, create evaluators, and work with LangSmith custom apps using publisher-authored skills.

Skill

Browse all topic collections → · See 29 new official additions →