LangChain
Getting started
LangChain is the most widely used framework for building LLM-powered agents. GTM Tools plugs in through langchain-mcp-adapters, the official adapter that turns any MCP server’s tools into standard LangChain tools. One connection gives a LangGraph agent buying-signal detection, LinkedIn company and people lookup, SMTP-verified email finding, and Reddit engagement, with real tool schemas the model can bind to.
There’s no langchain-gtm-tools package to install. The adapter reads our tool schemas live from the MCP server, so the tool list is always current.
Use cases
- Signal-gated prospecting graph: a node runs
detect_signal, a conditional edge drops accounts where nothing fired, and only survivors reach the expensive LinkedIn nodes. - Enrichment tool for an existing agent: bind
get_emailandget_linkedin_profile_urlto an agent that already handles your CRM. - Research subgraph: let the model choose between cheap SERP-only employee search and the full search depending on what the task needs.
- Human-in-the-loop outreach: draft with LangGraph’s interrupt, then send through
send_linkedin_messageonly after approval.
Prerequisites
- A GTM Tools API key, from
get_api_keyorgtm-tools admin login. See Get an API key. - Python 3.10+ and a LangChain-compatible model provider (an
OPENAI_API_KEYorANTHROPIC_API_KEY).
Setup
Install the adapter alongside LangGraph and your model provider:
Set your keys:
Quickstart
Build a ReAct agent with the full toolkit in a few lines:
You can also pull a single tool in if you don’t need the whole toolkit:
Available tools
The adapter discovers the tool catalog from the server at connection time, so there is no fixed inventory to copy into your code. The server exposes 63 tools: 8 billing, 19 LinkedIn, 21 Reddit, 1 email, 13 signals, and 1 geocoding.
See the MCP tool catalogue for names and parameter shapes, and Pricing for the token cost of each. get_token_balance returns the live cost table at runtime.
Narrow the tool set
Feeding all 63 tools to the model wastes context and invites wrong picks, so narrow to the workflow you are building:
Filter after loading, since the adapter fetches the whole catalog in one call.
Handling errors in a graph
Tool failures surface as exceptions from ainvoke, and the message carries the HTTP status. Two worth handling explicitly:
402 Insufficient tokens: stop the run rather than retrying. Top up withbuy_tokensor enableset_auto_reload.- A
200result withstatus: "try_again_later"andretry_after_seconds: a provider was busy. Sleep that long before one retry; each attempt is charged.
The full table is in the Error Reference.