Skip to main content
Glama
gacabartosz
by gacabartosz

ksef_draft_lock

Lock a validated draft to prevent editing and prepare it for sending by rendering XML and calculating its SHA-256 hash.

Instructions

Zablokuj draft do wysłania. Renderuje XML, oblicza hash SHA-256, ustawia status na 'locked'. Draft musi być wcześniej zwalidowany (ksef_draft_validate). Po zablokowaniu nie można go edytować.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID draftu (UUID)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden and does disclose important side effects: rendering XML, calculating SHA-256, setting status to 'locked', and preventing subsequent editing. It does not cover failure modes or permission requirements, but the core mutation behavior is transparent.

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

Conciseness5/5

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

Three short sentences deliver the purpose, the concrete effects, the required precondition, and the irreversible consequence with no filler or repetition. The main action is front-loaded, making the tool's role immediately clear.

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 simple one-parameter state-changing tool with no output schema, the description covers purpose, behavior, prerequisite, and postcondition. It is adequate for an agent to call correctly, though details like error handling or return value would make it fully complete.

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?

There is only one parameter, id, and the schema already describes it as 'ID draftu (UUID)', giving 100% schema description coverage. The description does not add parameter-specific detail beyond what the schema already provides, so the baseline score is appropriate.

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?

The description opens with a specific action and resource ('Zablokuj draft do wysłania') and then names concrete outcomes: rendering XML, computing a SHA-256 hash, and setting status to 'locked'. This clearly distinguishes it from sibling tools like ksef_draft_validate and ksef_draft_render_xml.

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

Usage Guidelines4/5

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

The description states the required precondition ('Draft musi być wcześniej zwalidowany (ksef_draft_validate)') and a key consequence ('Po zablokowaniu nie można go edytować'). This gives clear context for when to invoke it, though it does not explicitly mention alternatives to avoid.

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