Skip to main content
Glama

Prepare document from template

prepare_document_from_template

Makes a draft in Inkly from a template, with each role's email and the prefilled values. Nothing is sent. Returns the draft's id, status, and review_url: give the user that link to check and send it.

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": {
      "template_id": "<template_id>",
      "roles": "<roles>"
    },
    "name": "prepare_document_from_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
rolesYesOne entry for every role from get_template, each role exactly once: its role_id and the person's email.
titleNoThe document title. Defaults to the template's title.
messageNoA personal note in the invitation.
prefilledNoValues for the template's prefilled fields, keyed by field label.
request_idNoReuse this UUID when retrying. A replay returns the existing document without changing edits.
template_idYesThe template's id, from search_templates.

Output Schema

NameRequiredDescriptionDefault
documentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / roles / description
      Added value: +"One entry for every role from get_template, each role exactly once: its role_id and the person's email."
    • changedInput schema / properties / template_id / description
      Previous value: -"The template to send."New value: +"The template's id, from search_templates."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "document": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "app_url": {
      +          "format": "uri",
      +          "type": "string"
      +        },
      +        "completed_at": {
      +          "anyOf": [
      +            {
      +              "format": "date-time",
      +              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "created_at": {
      +          "format": "date-time",
      +          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      +          "type": "string"
      +        },
      +        "id": {
      +          "format": "uuid",
      +          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +          "type": "string"
      +        },
      +        "recipients": {
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "email": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "invite_delivery": {
      +                "anyOf": [
      +                  {
      +                    "enum": [
      +                      "pending",
      +                      "sending",
      +                      "sent",
      +                      "failed",
      +                      "bounced",
      +                      "complained",
      +                      "suppressed"
      +                    ],
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "name": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "role": {
      +                "enum": [
      +                  "signer",
      +                  "cc"
      +                ],
      +                "type": "string"
      +              },
      +              "status": {
      +                "enum": [
      +                  "pending",
      +                  "viewed",
      +                  "signed",
      +                  "declined"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "name",
      +              "email",
      +              "role",
      +              "status"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "review_url": {
      +          "format": "uri",
      +          "type": "string"
      +        },
      +        "sent_at": {
      +          "anyOf": [
      +            {
      +              "format": "date-time",
      +              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "status": {
      +          "enum": [
      +            "draft",
      +            "sent",
      +            "completed",
      +            "declined",
      +            "voided"
      +          ],
      +          "type": "string"
      +        },
      +        "title": {
      +          "type": "string"
      +        },
      +        "voided_at": {
      +          "anyOf": [
      +            {
      +              "format": "date-time",
      +              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "status",
      +        "app_url"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "document"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=false and destructiveHint=false, and the description usefully adds that no invitation is dispatched and what the return contains (id, status, review_url). It does not discuss the side effects that do occur (invitations/roles created, emails eventually sent on review) or what happens on retry, leaving meaningful mutation behavior undisclosed.

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?

Three short sentences, front-loaded with the action and the 'Nothing is sent' constraint, then the follow-up instruction. No filler; only slight redundancy between 'Makes a draft' and 'Returns the draft's id'.

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?

With an output schema present and full parameter coverage, the description covers the remaining agent-facing essentials: that this is a non-sending draft path and that the review_url must be surfaced to the user. Nothing needed to invoke or act on the result is missing.

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% and every parameter carries its own description, including role_id sourcing from GET /templates/{id} and request_id replay semantics. The description only restates that roles' emails and prefilled values are supplied, adding little beyond the schema, so the baseline 3 applies.

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 gives a specific verb and resource ('Makes a draft in Inkly from a template') and immediately scopes it with 'Nothing is sent', which separates it from the sibling send_template. An agent can tell what this produces 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 Guidelines4/5

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

It states the key usage condition ('Nothing is sent') and tells the agent what to do next with the result: hand the review_url to the user to check and send. It does not explicitly name send_template as the alternative for immediate dispatch, so the routing guidance is clear but not exhaustive.

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.