Fix formatting

This commit is contained in:
olaservo 2025-07-27 07:19:48 -07:00
commit 6ce4a0b563
2 changed files with 7 additions and 4 deletions

View file

@ -34,7 +34,7 @@ export async function getPrompt(
const stringArgs: Record<string, string> = {};
if (args) {
for (const [key, value] of Object.entries(args)) {
if (typeof value === 'string') {
if (typeof value === "string") {
stringArgs[key] = value;
} else if (value === null || value === undefined) {
stringArgs[key] = String(value);

View file

@ -30,7 +30,10 @@ export async function listTools(client: Client): Promise<McpResponse> {
}
}
function convertParameterValue(value: string, schema: JsonSchemaType): JsonValue {
function convertParameterValue(
value: string,
schema: JsonSchemaType,
): JsonValue {
if (!value) {
return value;
}
@ -92,11 +95,11 @@ export async function callTool(
// since we now accept pre-parsed values from the CLI
const stringArgs: Record<string, string> = {};
for (const [key, value] of Object.entries(args)) {
if (typeof value === 'string') {
if (typeof value === "string") {
stringArgs[key] = value;
}
}
if (Object.keys(stringArgs).length > 0) {
const convertedStringArgs = convertParameters(tool, stringArgs);
convertedArgs = { ...args, ...convertedStringArgs };