Skip to main content
Glama
deep-agentic-core-mcp

deep-agentic-core-mcp

Official

Optimization Opportunities

lens.optimization_analyze
Read-only

Ranks evidence-backed optimizations from AgenticLens run traces to compare prompt caching, retrieval pruning, retries, redundant steps, and quality-cost trade-offs without changing state.

Instructions

Rank evidence-backed optimizations from AgenticLens Run traces: prompt caching and compression, retrieval pruning and reranking, memory summarization, tool caching, retry policy, redundant steps, unnecessary handoffs and quality-cost trade-offs between variants. Each opportunity keeps projected benefit, confidence and quality risks separate. Advisory and read-only: no decision ledger writes and nothing is changed. Needs agenticlens>=0.11.0.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "traces": "<traces>"
    },
    "name": "lens.optimization_analyze"
  }
}

Input Schema

NameRequiredDescriptionDefault
configNoLens OptimizationConfig thresholds; unknown keys fail.
tracesYesAgenticLens Run trace JSON objects with unique run_id.
session_idNoSession to read/write shared state under. Defaults to 'default'.
baseline_variant_idNoVariant to compare quality-cost trade-offs against.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint and destructiveHint=false, so the safety profile is covered; the description reinforces it with the specific claim that no decision ledger writes occur and nothing is changed. It also adds genuinely new operational context: the agenticlens>=0.11.0 requirement and the fact that benefit, confidence and quality risks are reported separately rather than collapsed into a single score.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The verb-and-source clause is front-loaded, followed by the enumerated scope and then a compact set of constraints. The category list is long but each item earns its place by bounding what the tool will and will not evaluate; wording is dense without filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given four parameters, a nested trace object, and no output schema, the description covers the important gaps: version prerequisite, read-only guarantee, and roughly what the output structure separates (benefit, confidence, risks). It stops short of describing ordering, scoring scale, or how many opportunities are typically returned, which would fully close the loop.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds modest meaning by tying input to 'AgenticLens Run traces' with unique run_id and by connecting baseline_variant_id to 'quality-cost trade-offs between variants,' but config thresholds and session_id are left entirely to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Rank evidence-backed optimizations from AgenticLens Run traces,' then enumerates the optimization classes covered (caching, retrieval pruning, memory, retry policy, handoffs, variant trade-offs). This makes it distinguishable from analysis siblings like lens.compare_runs or lens.diagnose_run by scope, though it never names an alternative explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is implied by the input requirement (you must already have Run traces) and by the note that it is 'advisory and read-only,' but there is no explicit when-to-use-this-vs-sibling guidance among the many lens.* analysis tools. The version prerequisite is a concrete gating condition, which helps, but routing guidance is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.