OpenRouter 工作台 Local
v0.6.0-alpha.3Local OpenRouter cost analytics, reports, experiments and routing presets over MCP stdio.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_account_summary Get OpenRouter account summary
Get OpenRouter remaining credit plus today, yesterday, 7-day and 30-day spend. Use for balance or recent account-spend questions. Requires the configured Management Key.
| Parameter | Type | Description |
|---|---|---|
include_spend_windows | boolean | |
timezone | string |
get_analytics_meta Get OpenRouter Analytics schema
Get the live OpenRouter Analytics schema and optional ready-to-run query recipes for spend, API keys, providers and token analysis. Recipes never execute automatically.
| Parameter | Type | Description |
|---|---|---|
include_query_recipes | boolean |
query_usage Query OpenRouter usage analytics
Query OpenRouter spend, requests, tokens, cache, model, provider, API key, workspace, app, agent or time trends. Supports common time presets and advanced Analytics API fields.
| Parameter | Type | Description |
|---|---|---|
dimensions | array | |
filters | array | |
granularity | string | |
group_limit | integer | |
limit | integer | |
metrics | array | |
order_by | object | |
preset | string | |
time_range | object | |
timezone | string |
analyze_cost_anomalies Detect OpenRouter cost anomalies
Detect spend spikes over completed UTC or Asia/Shanghai days against a consecutive-day baseline. Shanghai verifies sparse hours against independent UTC day cost and request controls, excludes unresolved days, and limits analysis plus baseline to 31 days. Other timezones are unsupported.
| Parameter | Type | Description |
|---|---|---|
absolute_threshold_usd | number | |
baseline_days | integer | |
days | integer | Defaults to 30 for UTC, 7 for Asia/Shanghai. Shanghai days plus baseline_days must be at most 31. |
ratio_threshold | number | |
reconcile_sparse_days | boolean | Verify sparse Shanghai hours against independent complete UTC day totals. Set false for strict explicit-bucket auditing. |
timezone | string |
analyze_cost_optimization Analyze OpenRouter cost optimization opportunities
Analyze top OpenRouter cost contributors using live usage, token/cache metrics and optional current catalog/provider prices. Return observed signals, actionable verification steps and data-quality gaps. Savings are not invented or automatically estimated.
| Parameter | Type | Description |
|---|---|---|
include_provider_evidence | boolean | |
preset | string | |
timezone | string | |
top_models | integer |
list_api_keys List OpenRouter API keys
List API key metadata, limits and usage counters. Plaintext secrets are never returned.
| Parameter | Type | Description |
|---|---|---|
include_disabled | boolean | |
offset | integer | |
workspace_id | string |
compare_models Compare OpenRouter models
Compare OpenRouter model IDs using live catalog prices, context and optional provider evidence. If the user supplies a text-token workload, calculate an explicitly hypothetical cost scenario without running a generation. Missing prices or known context/modality violations prevent an estimate. Use official tools for quality evidence.
| Parameter | Type | Description |
|---|---|---|
model_ids * | array | |
include_endpoints | boolean | |
workload | object |
routerlens_status Check OpenRouter 工作台 configuration
Check whether the private OpenRouter 工作台 analytics bridge is configured. Does not expose credentials.
list_call_records list_call_records
List bounded OpenRouter request metadata by generation ID. Dates are start inclusive/end exclusive; defaults to yesterday. No prompt content, no inferred zero, no invented pagination.
| Parameter | Type | Description |
|---|---|---|
api_key_id | string | |
end_date | ||
finish_reason | string | |
limit | integer | |
model | string | |
provider | string | |
start_date | string | |
timezone | string |
get_call_detail get_call_detail
Read allowlisted metadata for one existing generation. Returns cost, tokens, timing and finish reason; never prompt/reply text. Credential-specific access may be unavailable.
| Parameter | Type | Description |
|---|---|---|
generation_id * | string |
investigate_spend investigate_spend
Compare a completed day with another completed day; attribute changes to model/provider. API-key labels are returned per hour and must not be treated as unique IDs.
| Parameter | Type | Description |
|---|---|---|
compare_date | ||
date | string | |
timezone | string |
explain_cost_anomaly explain_cost_anomaly
Explain a completed day against the preceding complete-day mean using reconciled model and app contributions plus request/input/output changes. Read-only metadata, no proven causal claims.
| Parameter | Type | Description |
|---|---|---|
baseline_days | integer | |
date | string | |
timezone | string |
generate_cost_report generate_cost_report
Generate and save an idempotent weekly report or daily alert from completed periods. Returns message text for approved Telegram delivery. Saving does not send; claim and record delivery separately.
| Parameter | Type | Description |
|---|---|---|
end_date | string | |
kind | string | |
timezone | string |
list_cost_reports list_cost_reports
List saved reports and delivery states. No query or notification is executed.
| Parameter | Type | Description |
|---|---|---|
limit | integer |
get_cost_report get_cost_report
Read a saved report including its completeness and delivery evidence.
| Parameter | Type | Description |
|---|---|---|
report_id * | string |
claim_report_delivery claim_report_delivery
Atomically claim a pending report before its approved Telegram send. Send only if claimed=true and should_notify=true. A stuck/unknown send must not be retried automatically.
| Parameter | Type | Description |
|---|---|---|
report_id * | string |
record_report_delivery record_report_delivery
Record an actual Telegram send receipt or uncertain failure for a claimed report. Does not send; never mark sent without a real receipt.
| Parameter | Type | Description |
|---|---|---|
report_id * | string | |
state * | string | |
message_id |
create_cost_experiment create_cost_experiment
Save a bounded experiment plan. Runs no model and changes no routing. Record results only after separately authorized trials or existing request review.
| Parameter | Type | Description |
|---|---|---|
baseline_model * | string | |
budget_usd * | number | |
candidate_models * | array | |
experiment_id * | string | |
quality_criteria * | string | |
minimum_cases | integer |
record_experiment_result record_experiment_result
Save metadata and owner-reviewed quality for a matched case. A generation ID reads actual cost/model; without it, supplied costs are explicitly manual evidence. Does not run inference.
| Parameter | Type | Description |
|---|---|---|
case_id * | ||
experiment_id * | string | |
quality_pass * | boolean | |
success * | boolean | |
variant * | string | |
cost_usd | number | |
generation_id | ||
latency_ms | number |
get_cost_experiment get_cost_experiment
Compare matched cases by owner-reviewed quality, actual/manual costs and latency. Includes unmatched cases and budget status; never performs a production switch.
| Parameter | Type | Description |
|---|---|---|
experiment_id * | string |
list_cost_experiments list_cost_experiments
List saved experiment plans.
save_model_preset save_model_preset
Save a versioned personal routing preset; expected_revision=0 creates. No provider writes or inference. To restore, read an old revision and save it against the current revision.
| Parameter | Type | Description |
|---|---|---|
config * | object | |
expected_revision * | integer | |
preset_id * | string |
list_model_presets list_model_presets
List the latest saved personal presets, including disabled presets.
get_model_preset get_model_preset
Read a preset or historical revision and revision history.
| Parameter | Type | Description |
|---|---|---|
preset_id * | string | |
revision | integer |
preview_model_routing preview_model_routing
Validate a configuration against current public model metadata and return an OpenRouter request fragment. Never executes the request or changes routing.
| Parameter | Type | Description |
|---|---|---|
config * | object |
export_model_preset export_model_preset
Validate and export an exact saved revision. No messages, credentials, inference or production routing changes.
| Parameter | Type | Description |
|---|---|---|
preset_id * | string | |
revision * | integer |
get_routing_providers get_routing_providers
Read current provider slugs and parameter support for a selected model.
| Parameter | Type | Description |
|---|---|---|
model_id * | string |
search_routing_models search_routing_models
Search current public model IDs to configure a preset.
| Parameter | Type | Description |
|---|---|---|
query * | string | |
limit | integer |