Skip to main content
Glama
baseSchema.ts1.32 kB
import { z } from 'zod'; /** * Base query schema with research context */ export const BaseQuerySchema = z.object({ researchGoal: z.string().optional().describe('Goal of the search'), reasoning: z .string() .optional() .describe('Why this approach helps reach the goal'), }); /** * Creates bulk query schema (1-5 queries per call) */ export function createBulkQuerySchema<T extends z.ZodTypeAny>( toolName: string, singleQuerySchema: T ) { return z.object({ queries: z .array(singleQuerySchema) .min(1) .max(5) .describe( `Queries for ${toolName} (1–5 per call). Review schema before use.` ), }); } export type BaseQuery = z.infer<typeof BaseQuerySchema>; /** * Common pagination parameter descriptions * Used across all tools for consistency */ export const COMMON_PAGINATION_DESCRIPTIONS = { charOffset: 'Start offset for pagination (default 0)', charLength: 'Max characters to return (recommend ≤10,000 for large results)', filesPerPage: 'Files per page. See tool schema for defaults/max.', filePageNumber: 'File page (1-based, default 1). Use with filesPerPage.', entriesPerPage: 'Entries per page. See tool schema for defaults/max.', entryPageNumber: 'Entry page (1-based, default 1). Use with entriesPerPage.', } as const;

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/bgauryy/local-explorer-mcp'

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