Skip to main content
Glama

wals.pro AI 4 weclapp

Preview entity action

preview_entity_action
Read-onlyIdempotent

Preview a weclapp workflow ACTION on one entity; return an approval token.

purchaseOrder.confirm: guarded draft to CONFIRMED, no receipt or supplier-confirmation proof. Generic actions: get_schema(entity).entity_actions. Domain actions (payload schema: get_entity_action_catalog(entity, action)): salesOrder createShipment|createSalesInvoice|cancel; quotation accept|createSalesInvoice|cancel; purchaseOrder bookIncomingGoods|cancel; incomingGoods bookReceipt; salesInvoice|purchaseInvoice cancel (status OPEN_ITEM_CREATED); purchaseInvoice correct (any field fix); shipment cancel (voids)|rework (status back to NEW); quotation|salesOrder|salesInvoice|shipment|performanceRecord createPdf; purchaseOpenItem|salesOpenItem createPaymentApplication|setPaymentState (payment_state PAID|UNPAID).

Args: entity: the record's entity (e.g. salesOrder, ticket). action: a generic or domain action (see above). entity_id: the numeric record id; omit it for incomingGoods.bookReceipt and when a payload number names the order. payload: action fields; most generic actions take none ({}). createShipment: {"sales_order_number": "...", "items": [{"positionNumber": 2, "quantity": 2}]}; bookIncomingGoods: same with purchase_order_number; setPaymentState: {"payment_state": "PAID"}. purchaseOrder.confirm accepts allow_automated_confirmation_email only after consent to supplier-email rules. ticket.linkSalesOrder requires salesOrderId. Unknown keys are dropped (dropped_fields); domain actions reject them. Returns: approval + execution, or ready_for_* false with diagnostics. when_to_use: First step of a workflow or domain action. purchaseOrder.manuallyClose requires CONFIRMED; createIncomingGoods is refused (bare scaffold) — book via purchaseOrder.bookIncomingGoods. preconditions: Live status and received/shipped/invoiced guards; processed records get no token. post_effects: No mutation; after the user explicitly confirms, execute_approved.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYes
entityYes
payloadNo
entity_idNo
correlation_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / entity_id / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / entity_id / default
      Added value: +null
    • removedInput schema / properties / entity_id / type
      Removed value: -"string"
    • changedInput schema / required
      Previous value: -[
      -  "entity",
      -  "action",
      -  "entity_id"
      -]New value: +[
      +  "entity",
      +  "action"
      +]
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds context beyond them: preconditions ('Live status and received/shipped/invoiced guards; processed records get no token'), post_effects ('No mutation; after the user explicitly confirms, execute_approved'), token-issuing semantics, and payload key-dropping behavior (dropped_fields vs domain-action rejection). This materially informs agent behavior.

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

Conciseness3/5

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

Front-loads the purpose, but the body is a dense, unformatted stream of dotted pseudo-keys (when_to_use:, preconditions:, post_effects:) and a long action matrix that partly duplicates what get_entity_action_catalog returns. Much of it earns its place as reference, but the structure is scattershot and heavier than needed for a routing decision.

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 the multi-action branching, an output schema exists so return-value detail is not required, and the description still notes 'approval + execution, or ready_for_* false with diagnostics.' It covers preconditions, post-effects and hand-off, though full payload contracts for domain actions live in a separate catalog tool.

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 0%, so the description must carry the load, and it documents entity, action, entity_id (including when to omit it) and payload with concrete JSON examples for several actions. It defers full payload schemas to get_entity_action_catalog and never mentions correlation_id, so it is strong but not exhaustive.

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, resource and effect: 'Preview a weclapp workflow ACTION on one entity; return an approval token.' The enumerated action matrix (purchaseOrder.confirm, salesOrder createShipment, etc.) makes the scope concrete. It does not explicitly name or differentiate from close siblings like preview_write_entity, preview_stock_operation, or preview_escalate_to_support, so it falls short of the top mark.

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?

Provides explicit when-to-use ('First step of a workflow or domain action'), a clear hand-off to execute_approved, and named alternatives with selecting conditions ('createIncomingGoods is refused... book via purchaseOrder.bookIncomingGoods', 'purchaseOrder.manuallyClose requires CONFIRMED'). The routing information is actionable rather than implied.

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.

Resources