get_fix_reference
Retrieve reference guides for fixing common VA form issues like yes/no UI, radio schemas, apostrophes, transformers, and full name paths to ensure compliance with VA.gov standards.
Instructions
Get quick reference for common fixes
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fix_type | Yes | Type of fix to get reference for |
Implementation Reference
- index.js:393-520 (handler)The 'get_fix_reference' tool implementation within the CallToolRequestSchema handler. It takes a 'fix_type' and returns the corresponding fix example from a dictionary.
case 'get_fix_reference': { const { fix_type } = args; const fixes = { yesNoUI: `## Fix: yesNoUI Pattern **Problem:** Complex object form with labelHeaderLevel, custom labels, errorMessages **Solution:** Simple pattern \`\`\`javascript // BEFORE (WRONG): yesNoUI({ title: 'Are you a patient in a nursing home?', labelHeaderLevel: '3', labels: { Y: 'Yes', N: 'No' }, errorMessages: { required: '...' }, }) // AFTER (CORRECT): yesNoUI('Are you a patient in a nursing home?') \`\`\``, radioSchema: `## Fix: radioSchema Function Call **Problem:** radioSchema used as bare reference instead of being called **Solution:** Call it with enum values \`\`\`javascript // BEFORE (WRONG): properties: { radioButtonList: radioSchema, } // AFTER (CORRECT): properties: { radioButtonList: radioSchema(['option1', 'option2', 'option3']), } \`\`\` **Note:** checkboxSchema is used directly (not called) - it's already a plain schema object.`, apostrophes: `## Fix: Apostrophe Syntax **Problem:** Single quotes containing apostrophes cause syntax errors **Solution:** Use double quotes or JSX expressions \`\`\`javascript // BEFORE (SYNTAX ERROR): formTitle: 'Report pension or parents' DIC eligibility' // AFTER (CORRECT - Option 1): formTitle: "Report pension or Parents' DIC eligibility" // AFTER (CORRECT - Option 2): <strong>{"If you're reporting changes after a spouse's death,"}</strong> \`\`\``, transformers: `## Fix: Submit Transformer **Problem:** Wrong return format, missing helpers, uses moment library **Solution:** Follow 21P-601 pattern \`\`\`javascript // WRONG: import moment from 'moment'; return { form: JSON.stringify(result) }; // CORRECT: import { transformForSubmit as defaultTransformForSubmit } from 'platform/forms-system/src/js/helpers'; export default function submitTransformer(formConfig, form) { const transformedData = JSON.parse(defaultTransformForSubmit(formConfig, form)); // Helper functions from 21P-601 const splitDate = dateString => { /* ... */ }; const formatName = nameObj => { /* ... */ }; const formatAddress = addressObj => { /* ... */ }; const result = { /* transform data */ }; return JSON.stringify(result); // Direct string return } \`\`\``, fullNamePath: `## Fix: fullNamePath in preSubmitInfo **Problem:** Missing fullNamePath prevents signature field on review page **Solution:** Add fullNamePath to statementOfTruth \`\`\`javascript // BEFORE (WRONG - No signature field): preSubmitInfo: { statementOfTruth: { body: 'I certify that the information in this form is accurate...', }, } // AFTER (CORRECT - Enables signature): preSubmitInfo: { statementOfTruth: { body: 'I certify that the information in this form is accurate...', messageAriaDescribedby: 'I certify that the information in this form is accurate...', fullNamePath: 'veteranFullName', // CRITICAL - path to name field }, } \`\`\` **This is CRITICAL** - without fullNamePath, the signature field won't appear on the review page!`, }; const content = fix_type === 'all' ? Object.values(fixes).join('\n\n---\n\n') : fixes[fix_type] || 'Fix type not found'; return { content: [ { type: 'text', text: content, }, ], }; } - index.js:120-133 (registration)The 'get_fix_reference' tool registration within the ListToolsRequestSchema handler, including its input schema defining the allowed 'fix_type' values.
name: 'get_fix_reference', description: 'Get quick reference for common fixes', inputSchema: { type: 'object', properties: { fix_type: { type: 'string', enum: ['yesNoUI', 'radioSchema', 'apostrophes', 'transformers', 'fullNamePath', 'all'], description: 'Type of fix to get reference for', }, }, required: ['fix_type'], }, },