Skip to main content
Glama

Tool of Truth

每一次工具调用,皆有实证。

面向 AI 代理工具使用的验证哨兵。一个 MITM 代理,拦截所有 MCP 工具调用,检测伪造、追踪成本、验证结果,并推断用户满意度。

功能

功能

状态

描述

MITM 代理

✅

透明拦截所有 MCP 工具调用

伪造检测

✅

7 信号深度分析:追踪、文档相似度、时序、占位符、矛盾

信任评分

✅

加权 0-100,并设有伪造上限

成本追踪

✅

支持 8 个提供商的单次调用成本

Token 计数

✅

每次调用的输入/输出 token

结果验证

✅

将工具结果与用户的原始提示词进行比较

技能遵循

✅

通过清单验证工作流

用户满意度

✅

从后续消息推断满意度

收据

✅

SHA-256 哈希,JSON + 人类可读

本地存储

✅

JSONL 每日文件 + 索引查询

工具透明度

✅

显示下游工具实际执行的操作

Related MCP server: openclaw-output-vetter-mcp

快速开始

1. 安装

npm install -g tooloftruth-mcp

2. 连接(选项 A:直接)

// Your agent's MCP config
{
  "tooloftruth": {
    "command": "tooloftruth-mcp"
  }
}

3. 连接(选项 B:代理 — MITM 模式)

// Your agent's MCP config
{
  "tooloftruth": {
    "command": "tooloftruth-mcp"
  }
}
// ~/.tooloftruth/proxy.json
{
  "servers": {
    "firecrawl": { "command": "npx", "args": ["firecrawl-mcp"] },
    "github": { "command": "npx", "args": ["@modelcontextprotocol/server-github"] }
  }
}

4. 使用

You: Did you actually use firecrawl?
Agent: [calls tooloftruth_verify]
Agent: VERIFIED — firecrawl was called at 10:30:02, trust score 98/100, cost $0.03

You: How much did I spend on tools today?
Agent: [calls tooloftruth_cost]
Agent: Total: $0.47 across 12 tool calls

You: Was that result what I asked for?
Agent: [calls tooloftruth_outcome]
Agent: ALIGNED — tool result matches your request

You: That's wrong, try again
Agent: [calls tooloftruth_satisfaction]
Agent: User appears dissatisfied — result may be wrong

CLI

# Intercept and monitor non-MCP commands
tooloftruth -- gh api repos/user/repo

# One-shot status report (daemon health, receipts, cost, top tools)
tooloftruth status

守护进程

一个 launchd 守护进程监视 .tooloftruth/receipts/,聚合每日统计信息,并在检测到伪造时发出警报。

# Install the daemon (macOS)
launchctl load ~/Library/LaunchAgents/com.tooloftruth.daemon.plist

统计信息写入 .tooloftruth/stats/YYYY-MM-DD.json。

真相扫描

tooloftruth_truth_scan 对声明进行真实的网络验证:Bing 搜索(curl)→ crawl4ai 抓取 → 证据提取 → 判定。

MCP 工具

工具

描述

tooloftruth_verify

验证某个特定工具是否被使用

tooloftruth_check

预检:工具是否已安装/配置?

tooloftruth_receipt

生成/查看验证收据

tooloftruth_cost

按工具统计成本明细

tooloftruth_history

搜索历史收据

tooloftruth_truth

完整的会话真相报告

tooloftruth_satisfaction

从消息中推断用户满意度

tooloftruth_outcome

验证结果是否与用户提示词匹配

tooloftruth_audit

将代理声明与实际工具调用进行交叉比对

tooloftruth_conversation

查看对话记录

tooloftruth_truth_scan

网络研究 + 事实核查某项声明

MITM 代理的工作原理

Agent ←→ Tool of Truth ←→ MCP Server (downstream)
              ↓
         Records everything
         Runs deep fabrication checks
         Verifies outcome alignment
         Infers satisfaction
         Generates receipts
         Returns result unchanged

存储

所有数据均保留在您机器的主目录中:

~/.tooloftruth/
├── config.json          ← settings
├── index.json           ← fast lookup index
├── proxy.json           ← downstream server config
├── receipts/
│   ├── 2026-08-17.jsonl ← today's calls
│   └── ...
├── conversations/
│   └── 2026-08-17.jsonl ← claim/action conversations
└── stats/               ← daemon aggregations
    ├── 2026-08-17.json
    └── ...

## Skill Manifests

Skills can attach verification manifests:

```json
{
  "skill": "last-30-days",
  "version": "2.1.0",
  "requires": {
    "github_mcp": {
      "tool": "get_repo_stats",
      "mustBeCalled": true
    }
  }
}

开发

git clone https://github.com/adigoel07/tooloftruth.git
cd tooloftruth
pnpm install
pnpm build
npx vitest run

许可证

MIT — 使用它、分叉它、在此基础上构建。

作者

由 adigoel07 构建。

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    Open-source MCP proxy that enforces security policies, content scanning, and audit logging between AI agents and tool servers
    25
    AGPL 3.0
  • A
    license
    A
    quality
    B
    maintenance
    MCP server for verifying AI agent claims vs reality — single-transcript inline grounding-check that flags when an agent's response states facts not in the input context, when its code silently swallows exceptions and substitutes mock data, or when its multi-turn transcript contains contradictions or unverified completion claims. Sub-second, local, free, no API calls.
    4
    42 PyPI
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables trust, reputation, and economic accountability for MCP by proxying between clients and servers, enriching every tool invocation with trust evaluation, KYA tiers, spending limits, and delegation chains.
    MIT