# MCP Tool Benchmark

**Use case:** 

Benchmark overlapping MCP tools from real runtime telemetry.

## Input

```json
{
  "tool_usage_logs": [
    {
      "tool_id": "docs_search",
      "usage_count": 120,
      "success_count": 116,
      "avg_latency_ms": 180,
      "p95_latency_ms": 320,
      "avg_cost_usd": 0.0012,
      "task_types": [
        "knowledge_search"
      ]
    },
    {
      "tool_id": "web_search",
      "usage_count": 40,
      "success_count": 34,
      "avg_latency_ms": 850,
      "p95_latency_ms": 1400,
      "avg_cost_usd": 0.008,
      "task_types": [
        "knowledge_search",
        "current_web_research"
      ]
    }
  ],
  "optimization_mode": "balanced",
  "max_recommended_tools": 1,
  "min_usage_count": 1,
  "context_tokens_per_tool": 160,
  "previous_analysis": {},
  "monthly_call_volume": 10000,
  "context_token_cost_per_million_usd": 2.5
}
```

## Output

```json
{
  "analysis_type": {
    "label": "Analysis type",
    "format": "string"
  },
  "optimization_mode": {
    "label": "Optimization mode",
    "format": "string"
  },
  "confidence": {
    "label": "Confidence",
    "format": "string"
  },
  "analyzed_tools": {
    "label": "Analyzed tools",
    "format": "integer"
  },
  "observed_calls": {
    "label": "Observed calls",
    "format": "integer"
  },
  "recommended_active_tools": {
    "label": "Recommended active tools",
    "format": "integer"
  },
  "prune_candidate_count": {
    "label": "Prune candidate count",
    "format": "integer"
  },
  "current_observed_cost_usd": {
    "label": "Current observed cost usd",
    "format": "number"
  },
  "observed_cost_on_prune_candidates_usd": {
    "label": "Observed cost on prune candidates usd",
    "format": "number"
  },
  "context_reduction_candidate_pct": {
    "label": "Context reduction candidate pct",
    "format": "number"
  },
  "estimated_context_tokens_reduced": {
    "label": "Estimated context tokens reduced",
    "format": "integer"
  },
  "recommendations": {
    "label": "Recommendations",
    "format": "array"
  },
  "routing_policy": {
    "label": "Routing policy",
    "format": "array"
  },
  "reliability_risks": {
    "label": "Reliability risks",
    "format": "array"
  },
  "validation_note": {
    "label": "Validation note",
    "format": "string"
  },
  "baseline_available": {
    "label": "Baseline available",
    "format": "boolean"
  },
  "active_tool_delta": {
    "label": "Active tool delta",
    "format": "integer"
  },
  "observed_cost_delta_pct": {
    "label": "Observed cost delta percent",
    "format": "number"
  },
  "projected_monthly_call_volume": {
    "label": "Projected monthly calls",
    "format": "integer"
  },
  "projected_monthly_tool_cost_current_usd": {
    "label": "Projected current monthly tool cost",
    "format": "number"
  },
  "projected_monthly_tool_cost_optimized_usd": {
    "label": "Projected optimized monthly tool cost",
    "format": "number"
  },
  "estimated_monthly_savings_usd": {
    "label": "Estimated monthly savings",
    "format": "number"
  },
  "estimated_annual_savings_usd": {
    "label": "Estimated annual savings",
    "format": "number"
  },
  "estimated_monthly_context_tokens_reduced": {
    "label": "Estimated monthly context tokens reduced",
    "format": "integer"
  },
  "confidence_score": {
    "label": "Optimization confidence score",
    "format": "integer"
  },
  "decision": {
    "label": "Decision",
    "format": "string"
  },
  "decision_reasons": {
    "label": "Decision reasons",
    "format": "array"
  }
}
```

## About this Actor

This example demonstrates how to use [AI Agent Tool Selection Optimizer - MCP Routing & Cost Audit](https://apify.com/quanmatrix/ai-agent-tool-selection-optimizer.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/quanmatrix/ai-agent-tool-selection-optimizer.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
This Task's input is already configured above — use it as-is rather than inventing a new one.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/quanmatrix/ai-agent-tool-selection-optimizer.md

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).
