Skip to main content
Glama

Create a function draft

create_function_draft

Create a new, empty function draft with a name and a description of what it should do. It has no code and does nothing until its code is written (generate_function_code, or by the owner in the site's settings) and it is deployed. Its address slug comes from the name.

Input Schema

NameRequiredDescriptionDefault
nameYesDisplay name, e.g. "Quote calculator"
site_idYesThe site, from list_sites
user_goalNoOptional: the user's goal behind this call, in one short sentence of plain words (e.g. "add a page so customers can book tables"). No names, emails or other personal details.
descriptionYesWhat the function should do

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / user_goal
      Added value: +{
      +  "description": "Optional: the user's goal behind this call, in one short sentence of plain words (e.g. \"add a page so customers can book tables\"). No names, emails or other personal details.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Beyond the annotations (which only declare non-readonly, non-destructive, non-idempotent), the description discloses that the created object has no code and does nothing until deployed, and that the slug is derived from the name — meaningful behavioral facts an agent would otherwise have to guess. It stops short of stating auth requirements or what happens on name collisions.

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, then consequences, then the slug detail. Every sentence carries information, though the parenthetical about owner editing is slightly more detail than strictly needed for tool selection.

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 4-param creation tool with no output schema, the description covers what is created, its inert initial state, and the follow-up actions required, which is enough to call it correctly. It does not indicate what identifier is returned, but with no output schema that is a minor omission rather than a blocking gap.

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 description coverage is 100%, so name, site_id, description, and user_goal are all documented at the schema level; baseline is 3. The description adds only the derived-slug note tied to name, which is marginal additional meaning beyond the schema.

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 verb and resource ('Create a new, empty function draft') and immediately scopes it as an empty scaffold, distinguishing it from generate_function_code and deploy_function which appear as siblings. An agent can tell this apart from the code-generation and deployment tools without opening any 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?

Explains the lifecycle context: the draft is inert until code is written (naming generate_function_code or manual owner editing) and then deployed, which effectively tells the agent this is the first step and what must follow. It does not explicitly state when NOT to use it or contrast with list_functions/get_function_details, so it falls short of a full when/when-not treatment.

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