Skip to main content
Glama
utils.ts1.26 kB
/** * Server Utilities Module * * This module provides utility functions for server-side operations in the Jira MCP tool. * It includes helpers for processing request parameters, validating input data formats, * and standardizing the handling of tool call requests. These utilities ensure consistent * parameter extraction and normalization across different API endpoints and tool calls. */ import { log } from '../utils/logger' import type { ToolCallParams } from '../types' /** * Process parameters from the request * @param request - The request object */ export function processRequestParameters(request: { params: ToolCallParams }): { name: string parameters: Record<string, unknown> } { const { name, parameters, arguments: args } = request.params log(`DEBUG: processRequestParameters: ${JSON.stringify(request.params)}`) // Combine parameters and arguments if both exist let combinedParams: Record<string, unknown> = {} if (parameters) { combinedParams = { ...combinedParams, ...parameters } } // Flatten the arguments instead of nesting them // Arguments take precedence over parameters with the same name if (args) { combinedParams = { ...combinedParams, ...args, } } return { name, parameters: combinedParams } }

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/tbreeding/jira-mcp'

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