Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/codeblockz/langchain-community-plugin/add-toolgit clone --depth 1 https://github.com/Codeblockz/langchain-community-pluginWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00013 | $0.00721 |
| Opus 5 | $0.00006 | $0.00360 |
| Sonnet 5 | $0.00003 | $0.00144 |
| Haiku 4.5 | $0.00001 | $0.00072 |
Grade A, and why
add-tool scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Add Tool Command
Add a new tool function to an existing LangGraph agent file.
Workflow
-
Parse arguments:
- First argument: tool name (required)
- Second argument: file path (optional, will search for agent files)
-
If no file specified, search for likely agent files:
agent.py,graph.py,main.py- Files containing
StateGraphorcreate_agent
-
Read the target file to understand its structure
-
Ask user what the tool should do (unless obvious from name)
-
Generate tool code following this pattern:
@tool
def tool_name(param1: str, param2: int = 10) -> str:
"""Brief description of what the tool does.
Args:
param1: Description of param1
param2: Description of param2 (default: 10)
"""
# Implementation
return result
-
Insert the tool in the appropriate location:
- After existing tool definitions
- Before the model/graph setup
-
Update tool registration:
- For
create_agent: Add totools=[...]list - For
StateGraph: Add totools = [...]andtools_by_name = {...}
- For
Tool Template
@tool
def {tool_name}({parameters}) -> {return_type}:
"""{description}
Args:
{arg_docs}
"""
{implementation}
return {result}
Best Practices to Apply
- Always include docstring with Args section - LLMs use this
- Use type hints for all parameters and return value
- Keep tools focused - one clear purpose
- Return strings for simple tools (easier for LLM to process)
- Handle errors gracefully - return error messages, don't raise
Example Additions
API Tool
@tool
def fetch_weather(city: str) -> str:
"""Get current weather for a city.
Args:
city: City name (e.g., "San Francisco")
"""
# TODO: Call weather API
return f"Weather in {city}: Sunny, 72°F"
Database Tool
@tool
def query_database(sql: str) -> str:
"""Execute a read-only SQL query.
Args:
sql: SQL SELECT query to execute
"""
# TODO: Implement with proper connection handling
return "Query results..."
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 124 lines · 13 tokens per session scan A 4a8e0b2c8209
add-tool is a command published in the GitHub repository Codeblockz/langchain-community-plugin (3 stars, last pushed 7mo ago), licensed Apache-2.0. It adds 13 tokens to every session and 721 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
date
询问当天的日期,输出的格式为 yyyy-MM-dd 星期几.
add-eval
Create a new evaluator for assessing agent performance.
add-subgraph
Create a modular subgraph that can be composed into the main workflow.
human-in-the-loop
Add human approval or intervention points to your workflow.
run-evals
Execute the evaluation suite against the LangGraph agent.
add-node
Create a new node in the LangGraph workflow.