Skip to main content
Glama

Natural Language Query

Process natural language queries to retrieve project and task information from the Project Tracker MCP Server. Ask questions like "Show me John's overdue tasks" to get relevant data.

Instructions

Process natural language queries with enhanced entity discovery and intelligent analysis

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesNatural language query (e.g., "Show me John's overdue tasks")

Implementation Reference

  • MCP tool definition including name, Zod input schema, description, and handler function that executes the natural language query processing logic
    export const naturalLanguageQueryTool = { name: 'Natural Language Query', description: 'Process natural language queries with enhanced entity discovery and intelligent analysis', parameters: z.object({ prompt: z .string() .min(5, 'Prompt must be at least 5 characters') .max(500, 'Prompt must be less than 500 characters') .describe( 'Natural language query (e.g., "Show me Sarah\'s overdue tasks", "Analyze project health")', ), }), handler: async ({ prompt }: { prompt: string }) => { const processor = new NaturalLanguageQueryProcessor(process.env.MCP_DEBUG_MODE === 'true'); const result = await processor.processQuery(prompt); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }, };
  • Zod-based input schema definition for the tool parameters
    parameters: z.object({ prompt: z .string() .min(5, 'Prompt must be at least 5 characters') .max(500, 'Prompt must be less than 500 characters') .describe( 'Natural language query (e.g., "Show me Sarah\'s overdue tasks", "Analyze project health")', ), }),
  • Registration of the Natural Language Query tool in the mcpTools array exported for use by the MCP server
    import { naturalLanguageQueryTool } from './natural_language_query'; import { workloadAnalysisTool } from './workload_analysis'; import { riskAssessmentTool } from './risk_assessment'; // EXPANSION: Consolidated tool registry for MCP server export const mcpTools = [naturalLanguageQueryTool, workloadAnalysisTool, riskAssessmentTool];
  • Tool-specific schema provided in server for tool listing response (fallback/JSON schema)
    case 'Natural Language Query': return { type: 'object', properties: { prompt: { type: 'string', description: 'Natural language query (e.g., "Show me John\'s overdue tasks")', minLength: 5, maxLength: 500, }, }, required: ['prompt'], };

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/jatinderbhola/mcp-taskflow-tracker-api'

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