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 instructions/chartrambiz/diamcp/agents-mdgit clone --depth 1 https://github.com/chartrambiz/diaMCPWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/chartrambiz/diamcp/agents-md)<a href="https://agentmods.dev/instructions/chartrambiz/diamcp/agents-md"><img src="https://agentmods.dev/badge/instructions/chartrambiz/diamcp/agents-md.svg" alt="Measured on agentmods" height="20"></a>What 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.02200 | $0.02200 |
| Opus 5 | $0.01100 | $0.01100 |
| Sonnet 5 | $0.00440 | $0.00440 |
| Haiku 4.5 | $0.00220 | $0.00220 |
Grade B, and why
diaMCP AGENTS.md scanned grade B with 1 finding 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 4d ago.
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.
Sends data to an external URLmediumData exfiltration
A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.
response = httpx.post("https://api.example.com/todos", json={"title": title, "completed": completed}, timeout=10) How it starts
The opening of the file, as written. The whole thing — 273 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent Tools - diaMCP
This file documents capabilities for AI agents using the diaMCP server.
Creating New Tools
You can create your own tools dynamically using the create_tool function. When you discover an API or need a capability that doesn't exist, you can bootstrap a new tool.
The create_tool Tool
Parameters:
name- Tool name (lowercase, underscores, starts with letter)description- What the tool doesschema- JSON schema for parameters (as JSON string)code- Python function body (MUST follow the template below)requirements- Optional. Any new Python package dependencies (e.g.,yfinance>=1.2.0)
⚠️ STRICT RULES FOR CODE PARAMETER
The code parameter MUST follow this exact template:
# 1. Imports FIRST (before anything else)
import requests
import json
# 2. Then the function with @tool decorator
def my_tool(param1: str, param2: int = 10) -> str:
"""
Brief description of what this tool does.
Args:
param1: Description of first parameter
param2: Description of second parameter (default: 10)
Returns:
Description of what is returned
"""
try:
# Your code here
return "success"
except Exception as e:
return f"Error: {str(e)}"
CRITICAL RULES:
- ALL imports MUST be at the very top - before the
@tooldecorator - The function name MUST match the tool name
- The
@tooldecorator and function definition MUST be together - decorator on line above function - Schema must have proper bracket matching - verify all
{}and[]are closed
Example: Creating a Simple Tool
Suppose the user mentions a weather API at api.weather.com with endpoint /current?city=X. You could create a tool:
create_tool(
name="get_weather",
description="Get current weather for a city from the weather API",
schema='''{
"type": "object",
"properties": {
"city": {"type": "string", "description": "City name"}
},
"required": ["city"]
}''',
code='''import httpx
def get_weather(city: str) -> str:
"""
Get current weather for a city from the weather API.
Args:
city: The city name to get weather for
Returns:
JSON weather data or error message
"""
try:
response = httpx.get(f"https://api.weather.com/current?city={city}", timeout=10)
return response.json()
except Exception as e:
return f"Error: {e}"
''',
requirements="httpx>=0.27.0"
)
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.
- 4d ago First seen · 273 lines · 2,200 tokens per session scan B e8eb3d7125d9
diaMCP AGENTS.md is an instructions file published in the GitHub repository chartrambiz/diaMCP (20 stars, last pushed 5mo ago), licensed MIT. It adds 2,200 tokens to every session, about $0.0110 per session on Opus 5. A static security scan graded it B with 1 finding (sends data to an external url). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
next.js AGENTS.md
Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.