Skip to main content
Glama

Create a smart field

create_smart_field

Define a new custom product field from the merchant's own words — "a one-sentence description", "the material from the specs attribute". Foldsquare turns it into a rule: a formula when the value can be worked out from the product data (free, never calls AI again), otherwise an AI instruction whose results are stored per product. Saves the field and returns a preview on a few real products. With generate (default true) it then fills the field in for every product in the background; AI fields count each product against the monthly allowance. Show the merchant the preview before building a catalog on 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": {
      "instruction": "<instruction>"
    },
    "name": "create_smart_field"
  }
}

Input Schema

NameRequiredDescriptionDefault
generateNoFill the field in for every product now (default true)
instructionYesWhat the field should contain, in the merchant's words

Output Schema

NameRequiredDescriptionDefault
noteNo
fieldYes
previewYes
generatingYesThe products being filled in now, or null when not asked to

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the annotations (which only declare this is a non-read-only, non-destructive, closed-world call), the description discloses the cost model: formulas are free and never call AI again, AI fields consume a monthly per-product allowance, and generation runs in the background. It also states that it saves the field and returns a preview on real products, which is the key side effect an agent needs.

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?

The purpose is front-loaded and each sentence adds a distinct fact — mechanism, cost, preview, generation. It is dense with exemplar phrasing ("a one-sentence description", "the material from the specs attribute") that verges on marketing but does clarify the expected input style.

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 two-parameter mutation with annotations and an output schema, the description covers the important unknowns: what gets created, cost implications, background work, and preview behavior. Minor gaps remain around duplicate or conflicting field definitions and what happens to already-generated values, but nothing critical for correct invocation is missing.

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 100%, so the baseline is 3; the description earns more by explaining that `instruction` is the merchant's own words (justifying the free-form min/max length) and that `generate` triggers an immediate background fill with billing consequences. It does not address the 2000-character limit or what a preview response contains, but the output schema covers the latter.

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?

The description uses a specific verb and resource ("Define a new custom product field") and explains the mechanism (formula when derivable, otherwise AI instruction stored per product), which the name alone would not convey. It falls short of a 5 because the adjacent sibling generate_smart_field is never named, even though the default `generate` behavior overlaps with it.

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?

"Show the merchant the preview before building a catalog on it" gives clear workflow guidance, and the note about `generate` defaulting to true tells the agent what happens if it says nothing. There are no explicit when-not-to-use conditions and no routing to the generate_smart_field or update/delete siblings.

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