Skip to main content
Glama

Lovie Company Formation

Resolve Document Template

document_template_resolve_template

Find the best template match for a natural-language document request. Returns the template slug and its field definitions to collect before DocumentService.CreateDocument.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
templateNo
alternativesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changed
    • addedOutput schema / properties / alternatives / items / properties / description / anyOf
      Added value: +[
      +  {
      +    "description": "Free-form description (max 5000 chars).",
      +    "properties": {
      +      "value": {
      +        "maxLength": 5000,
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / alternatives / items / properties / description / description
      Removed value: -"Free-form description (max 5000 chars)."
    • removedOutput schema / properties / alternatives / items / properties / description / properties
      Removed value: -{
      -  "value": {
      -    "maxLength": 5000,
      -    "type": "string"
      -  }
      -}
    • removedOutput schema / properties / alternatives / items / properties / description / type
      Removed value: -"object"
    • addedOutput schema / properties / alternatives / items / properties / title / anyOf
      Added value: +[
      +  {
      +    "description": "Human-readable name (1-255 Unicode chars).",
      +    "properties": {
      +      "value": {
      +        "maxLength": 255,
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / alternatives / items / properties / title / description
      Removed value: -"Human-readable name (1-255 Unicode chars)."
    • removedOutput schema / properties / alternatives / items / properties / title / properties
      Removed value: -{
      -  "value": {
      -    "maxLength": 255,
      -    "minLength": 1,
      -    "type": "string"
      -  }
      -}
    • removedOutput schema / properties / alternatives / items / properties / title / type
      Removed value: -"object"
    • addedOutput schema / properties / template / anyOf
      Added value: +[
      +  {
      +    "properties": {
      +      "fields": {
      +        "items": {
      +          "properties": {
      +            "choices": {
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "defaultValue": {
      +              "type": "string"
      +            },
      +            "description": {
      +              "type": "string"
      +            },
      +            "key": {
      +              "type": "string"
      +            },
      +            "label": {
      +              "type": "string"
      +            },
      +            "required": {
      +              "type": "boolean"
      +            },
      +            "source": {
      +              "type": "string"
      +            },
      +            "type": {
      +              "enum": [
      +                "DOCUMENT_FIELD_TYPE_UNSPECIFIED",
      +                "DOCUMENT_FIELD_TYPE_STRING",
      +                "DOCUMENT_FIELD_TYPE_DATE",
      +                "DOCUMENT_FIELD_TYPE_NUMBER",
      +                "DOCUMENT_FIELD_TYPE_TEXT"
      +              ],
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "summary": {
      +        "anyOf": [
      +          {
      +            "properties": {
      +              "category": {
      +                "type": "string"
      +              },
      +              "description": {
      +                "anyOf": [
      +                  {
      +                    "description": "Free-form description (max 5000 chars).",
      +                    "properties": {
      +                      "value": {
      +                        "maxLength": 5000,
      +                        "type": "string"
      +                      }
      +                    },
      +                    "type": "object"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "slug": {
      +                "type": "string"
      +              },
      +              "tags": {
      +                "items": {
      +                  "type": "string"
      +                },
      +                "type": "array"
      +              },
      +              "templateId": {
      +                "type": "string"
      +              },
      +              "title": {
      +                "anyOf": [
      +                  {
      +                    "description": "Human-readable name (1-255 Unicode chars).",
      +                    "properties": {
      +                      "value": {
      +                        "maxLength": 255,
      +                        "minLength": 1,
      +                        "type": "string"
      +                      }
      +                    },
      +                    "type": "object"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "version": {
      +                "type": "integer"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / template / properties
      Removed value: -{
      -  "fields": {
      -    "items": {
      -      "properties": {
      -        "defaultValue": {
      -          "type": "string"
      -        },
      -        "description": {
      -          "type": "string"
      -        },
      -        "key": {
      -          "type": "string"
      -        },
      -        "label": {
      -          "type": "string"
      -        },
      -        "required": {
      -          "type": "boolean"
      -        },
      -        "source": {
      -          "type": "string"
      -        },
      -        "type": {
      -          "enum": [
      -            "DOCUMENT_FIELD_TYPE_UNSPECIFIED",
      -            "DOCUMENT_FIELD_TYPE_STRING",
      -            "DOCUMENT_FIELD_TYPE_DATE",
      -            "DOCUMENT_FIELD_TYPE_NUMBER",
      -            "DOCUMENT_FIELD_TYPE_TEXT"
      -          ],
      -          "type": "string"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  "summary": {
      -    "properties": {
      -      "category": {
      -        "type": "string"
      -      },
      -      "description": {
      -        "description": "Free-form description (max 5000 chars).",
      -        "properties": {
      -          "value": {
      -            "maxLength": 5000,
      -            "type": "string"
      -          }
      -        },
      -        "type": "object"
      -      },
      -      "slug": {
      -        "type": "string"
      -      },
      -      "tags": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "templateId": {
      -        "type": "string"
      -      },
      -      "title": {
      -        "description": "Human-readable name (1-255 Unicode chars).",
      -        "properties": {
      -          "value": {
      -            "maxLength": 255,
      -            "minLength": 1,
      -            "type": "string"
      -          }
      -        },
      -        "type": "object"
      -      },
      -      "version": {
      -        "type": "integer"
      -      }
      -    },
      -    "type": "object"
      -  }
      -}
    • removedOutput schema / properties / template / type
      Removed value: -"object"
  2. Changed1 schema field changed
    • changedOutput schema / properties / template / properties / fields / items / properties / type / enum
      Previous value: -[
      -  "DOCUMENT_FIELD_TYPE_UNSPECIFIED",
      -  "DOCUMENT_FIELD_TYPE_STRING",
      -  "DOCUMENT_FIELD_TYPE_DATE",
      -  "DOCUMENT_FIELD_TYPE_NUMBER",
      -  "DOCUMENT_FIELD_TYPE_TEXT",
      -  "DOCUMENT_FIELD_TYPE_SIGNATURE"
      -]New value: +[
      +  "DOCUMENT_FIELD_TYPE_UNSPECIFIED",
      +  "DOCUMENT_FIELD_TYPE_STRING",
      +  "DOCUMENT_FIELD_TYPE_DATE",
      +  "DOCUMENT_FIELD_TYPE_NUMBER",
      +  "DOCUMENT_FIELD_TYPE_TEXT"
      +]
  3. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations include destructiveHint=false but not readOnlyHint, so the description carries some burden. It usefully explains that the tool returns a template slug and field definitions, which is behavioral information beyond the annotations, but it does not mention what happens when no template matches or whether the operation is read-only.

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?

The description is two sentences with no fluff. It front-loads the core purpose and then states the return value and downstream usage, which is exactly the information an agent needs.

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?

This is a simple one-parameter tool with an output schema, so the description is mostly complete: it explains purpose, input semantics, and return purpose. It could be more complete by explicitly noting that the query parameter is required and by clarifying behavior on no match, but the current text is adequate 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?

The schema only defines 'query' as a string with no description. The tool description adds meaning by identifying it as a 'natural-language document request,' which is the key semantic needed to invoke the tool correctly. It does not give examples, but with a single parameter this is sufficient.

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 clearly states a specific verb and resource: 'Find the best template match for a natural-language document request.' It also distinguishes this from simple listing by saying it returns a slug and field definitions to use before document creation, which differentiates it from sibling tools like document_template_list_templates.

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 gives clear usage context: use it when you need to resolve a natural-language document request into a template before creating a document. It does not explicitly contrast with the similar-looking document_template_list_templates or state when not to use this tool, so it stops short of a 5.

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.