Skip to content

Commit cfd5261

Browse files
committed
docs: add AI-facing input hints to server instructions and tool descriptions
- Server instructions: document checkbox/multiselect auto-normalization and multiselect comma limitation - gf_create_entry/gf_update_entry descriptions mention auto-normalization - gf_list_field_types summary mode includes entry_input hints for checkbox, multiselect, list, name, address, consent, chainedselect
1 parent 2815ed5 commit cfd5261

2 files changed

Lines changed: 20 additions & 9 deletions

File tree

src/field-operations/index.js

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,23 @@ export const fieldOperationHandlers = {
177177
validation: def.validation
178178
}));
179179
} else {
180-
// Summary mode (default) — minimal tokens
181-
fieldTypes = entries.map(([type, def]) => ({
182-
type,
183-
label: def.label,
184-
category: def.category
185-
}));
180+
// Summary mode (default) — minimal tokens, with entry input hints
181+
const inputHints = {
182+
checkbox: 'array: ["val1","val2"] — auto-matched to sub-inputs',
183+
multiselect: 'array: ["val1","val2"] — commas in values get split',
184+
select: 'string: "value"',
185+
radio: 'string: "value"',
186+
list: 'array: ["a","b"] or [{Col1:"a",Col2:"b"}] for multi-col',
187+
name: 'dot-notation: {"1.3":"First","1.6":"Last"}',
188+
address: 'dot-notation: {"2.1":"Street","2.3":"City","2.4":"State","2.5":"ZIP"}',
189+
consent: 'dot-notation: {"5.1":"1","5.2":"text","5.3":"revision"}',
190+
chainedselect: 'dot-notation: {"1.1":"Level1","1.2":"Level2"}',
191+
};
192+
fieldTypes = entries.map(([type, def]) => {
193+
const entry = { type, label: def.label, category: def.category };
194+
if (inputHints[type]) entry.entry_input = inputHints[type];
195+
return entry;
196+
});
186197
}
187198

188199
return {

src/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const server = new Server(
4242
capabilities: {
4343
tools: {}
4444
},
45-
instructions: 'GravityKit MCP server for Gravity Forms. All responses strip null and empty values by default for minimal token usage. Pass compact=false on any tool to get full raw data. Entry tools also strip plugin-added meta keys; use compact=false to include them.'
45+
instructions: 'GravityKit MCP server for Gravity Forms. Checkbox/multiselect arrays auto-normalized: pass ["val1","val2"] and values are matched to correct sub-inputs. Text labels also work. Multiselect limitation: values containing commas get split by GF REST API. Responses strip null/empty by default; pass compact=false for full raw data.'
4646
}
4747
);
4848

@@ -327,7 +327,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
327327
},
328328
{
329329
name: 'gf_create_entry',
330-
description: 'Create an entry',
330+
description: 'Create an entry. Checkbox/multiselect arrays auto-normalized.',
331331
annotations: { idempotentHint: false, openWorldHint: true },
332332
inputSchema: {
333333
type: 'object',
@@ -347,7 +347,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
347347
},
348348
{
349349
name: 'gf_update_entry',
350-
description: 'Update an entry',
350+
description: 'Update an entry. Checkbox/multiselect arrays auto-normalized; unmentioned fields preserved.',
351351
annotations: { idempotentHint: false, openWorldHint: true },
352352
inputSchema: {
353353
type: 'object',

0 commit comments

Comments
 (0)