Skip to main content
Glama

lesson_search

Read-onlyIdempotent

WHEN: BEFORE investigating a problem, designing a change or answering a question about how a client's D365 F&O works: check whether it was already solved. Returns the lessons learned that best match, with their problem, cause and solution. Triggers: 'did we already see this', 'a-t-on déjà eu ce problème', 'known issue', 'leçons apprises', 'how did we fix'. Pass the D365 objects involved in objects when you know them: they weigh most. A result marked UNVALIDATED has not been reviewed by an administrator: use it as a lead and verify it. A lesson records a past case: confirm the cause is the same before applying its solution, and say which lesson you used.

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": {
      "query": "<query>"
    },
    "name": "lesson_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesThe symptom, error message or question, in plain words.
objectsNoOptional: comma-separated D365 objects involved, e.g. 'SalesLine, CustInvoiceJour'.
maxResultsNoMaximum lessons to return (1-10, default 5).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the description correctly spends its words elsewhere: it discloses the trust semantics (UNVALIDATED results are unreviewed leads) and a caution to re-confirm the cause before applying a past solution. That is behavior beyond what the annotations provide and materially affects how results should be used.

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?

Front-loaded with WHEN before any detail, and each remaining sentence carries distinct guidance (ranking weight, UNVALIDATED meaning, verification duty). Slightly dense with the bilingual trigger list, which is useful but adds bulk.

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

Completeness5/5

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

No output schema exists, so the description must explain returns, and it does: matched lessons include problem, cause and solution, plus an UNVALIDATED marker. Combined with the timing and verification guidance, nothing material is missing for correct invocation.

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

Parameters4/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, but the description adds value the schema does not: it explains that D365 objects passed in `objects` 'weigh most' in ranking, telling the agent how the parameter changes results rather than just its format. It does not elaborate query or maxResults, but those are self-explanatory in the schema.

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

Purpose5/5

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

States a specific verb and resource ('Returns the lessons learned that best match, with their problem, cause and solution') plus scope ('check whether it was already solved'). Clearly distinguishable from lesson_save, find_error_patterns, and search_d365_code.

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

Usage Guidelines5/5

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

Opens with an explicit WHEN clause including the precondition ('BEFORE investigating a problem, designing a change or answering a question'), and the sibling relation to investigation tools is implied by that timing. Provides concrete trigger phrases, so the agent knows both when to fire it and at what point in a workflow.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.