Skip to main content
Glama

lesson_save

WHEN: a problem has just been solved, or a convention or procedure was agreed, and it should not need explaining again. Triggers: 'keep this', 'retiens ça', 'save this lesson', 'note this for next time', 'capitalise'. Propose it to the user first and save only with their agreement. Write it so a stranger could apply it: the problem as it showed up (the symptom and message), the cause, the solution step by step, and the D365 objects involved. The lesson is saved for the caller's client as UNVALIDATED; an administrator reviews it before it is trusted. Never put secrets, passwords, tokens or personal data in a lesson.

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": {
      "title": "<title>",
      "problem": "<problem>",
      "solution": "<solution>"
    },
    "name": "lesson_save"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNo'lesson' (default), 'convention' (how this client does things) or 'procedure' (a repeatable how-to).lesson
tagsNoOptional: comma-separated keywords.
causeNoWhy it happened, when known.
titleYesShort title that says what it is about, e.g. 'Sales invoice posting fails when the tax group is empty'.
objectsNoOptional: comma-separated D365 objects involved.
problemYesThe problem as it appeared: symptom, error message, where.
solutionYesWhat fixed it, in steps.
sourceRefNoOptional: where it came from, e.g. 'WI 6587' or 'PR 142'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses that the record is written as UNVALIDATED for the caller's client, that an administrator reviews it before it is trusted, and that secrets/passwords/tokens/personal data must never be included. These are exactly the traits annotations cannot express.

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 and triggers, then the approval rule, then content guidance, then lifecycle/security caveats. Dense but each sentence carries actionable information; slightly long for a single tool.

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?

For a mutation tool with no output schema, it covers authorization gating, resulting record state, confidentiality constraints, and content quality bar. The only gap is what the call returns (e.g. an id or confirmation), which an agent may need for follow-up.

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 baseline is 3; the description earns above that by prescribing the content each field must contain (symptom and error message, cause, step-by-step solution, D365 objects involved) and giving audience criteria ('write it so a stranger could apply it'). It does not cover 'kind' or 'sourceRef' beyond what the schema already says.

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 action (save a lesson/convention/procedure) scoped to the caller's client, and the trigger list makes it unmistakably distinct from lesson_search. An agent can pick it without opening the schema.

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, gives concrete user phrasings as triggers, and adds the gating rule 'Propose it to the user first and save only with their agreement' — which also implies when not to call it. That is as specific as usage guidance gets.

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.