Skip to main content
Glama

kb_quick_setup

Configure predefined forms for identity, technical, or organizational data to establish persistent knowledge storage for AI agents.

Instructions

Quick setup using predefined forms for common scenarios

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesForm data as key-value pairs
formTypeYesType of quick setup form

Implementation Reference

  • The main handler function that executes the kb_quick_setup tool. Processes the formType and data arguments, validates the form, parses inputs, and updates the knowledge base sections (personal, professional, preferences, custom) based on the form type.
    case 'kb_quick_setup': { const { formType, data } = args as any; const form = quickForms[formType]; if (!form) { throw new Error(`Unknown form type: ${formType}`); } const updates: any = {}; for (const [key, value] of Object.entries(data)) { const fieldDef = form.fields[key]; if (fieldDef) { updates[key] = parseFormInput(value as string, fieldDef.type); } } // Apply updates based on form type if (formType === 'identity') { await km.updatePersonal({ name: updates.name, currentLocation: updates.location, languages: updates.languages }); await km.updateProfessional({ occupation: updates.occupation }); } else if (formType === 'technical') { await km.updateProfessional({ role: updates.role, yearsOfExperience: updates.experience, skills: updates.skills }); await km.updatePreferences({ favoriteTools: updates.tools }); } else if (formType === 'organization') { await km.addCustomKnowledge('organization', 'name', updates.orgName); await km.addCustomKnowledge('organization', 'industry', updates.industry); if (updates.size) await km.addCustomKnowledge('organization', 'size', updates.size); if (updates.mission) await km.addCustomKnowledge('organization', 'mission', updates.mission); } return { content: [ { type: 'text', text: `✅ Quick setup completed for ${formType}` } ] }; }
  • src/index.ts:64-82 (registration)
    The tool registration object in the tools array, defining the name, description, and input schema for kb_quick_setup. This is returned by list tools requests.
    { name: 'kb_quick_setup', description: 'Quick setup using predefined forms for common scenarios', inputSchema: { type: 'object', properties: { formType: { type: 'string', enum: ['identity', 'technical', 'organization'], description: 'Type of quick setup form' }, data: { type: 'object', description: 'Form data as key-value pairs' } }, required: ['formType', 'data'] } },
  • Predefined quick form definitions for 'identity', 'technical', and 'organization' used by the kb_quick_setup handler to validate and process input fields.
    export const quickForms: Record<string, any> = { identity: { title: "Quick Identity Setup", fields: { name: { type: 'text', label: 'Full Name', required: true }, occupation: { type: 'text', label: 'Job Title', required: true }, location: { type: 'text', label: 'Location', required: false }, languages: { type: 'array', label: 'Languages', required: false } } }, technical: { title: "Technical Profile", fields: { role: { type: 'text', label: 'Role', required: true }, experience: { type: 'number', label: 'Years of Experience', required: true }, skills: { type: 'array', label: 'Skills', required: true }, tools: { type: 'array', label: 'Favorite Tools', required: false } } }, organization: { title: "Organization Setup", fields: { orgName: { type: 'text', label: 'Organization Name', required: true }, industry: { type: 'text', label: 'Industry', required: true }, size: { type: 'select', label: 'Company Size', options: ['1-10', '11-50', '51-200', '200+'], required: false }, mission: { type: 'text', label: 'Mission', required: false } } } };
  • Utility function to parse string input from forms into appropriate types (array, number, boolean) based on field type, used in kb_quick_setup handler.
    export function parseFormInput(input: string, type: string): any { if (type === 'array' || type === 'multiselect') { return input.split(',').map(s => s.trim()).filter(s => s.length > 0); } else if (type === 'number') { return parseInt(input, 10); } else if (type === 'boolean') { return input.toLowerCase() === 'true' || input.toLowerCase() === 'yes'; } return input; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hlsitechio/mcp-instruct'

If you have feedback or need assistance with the MCP directory API, please join our Discord server