Skip to content

Cannot be used with Cursor, SonarQube 9.9 #217

@andelf

Description

@andelf

Describe the bug

It seems the schema (argument types) is incompatible with Cursor IDE.

To Reproduce

  • Cursor IDE (recent versions)
  • with Self-hosted SonarQube
  • setting up mcpServer
  • Trigger any calling

Expected behavior

Tool calling should work.

Screenshots

Image

Additional context

It seems the grammar of schema types is not supported.

After I hacked some code, it works as expected:

+++ b/src/schemas/common.ts
@@ -113,14 +113,7 @@ export const impactSoftwareQualitiesSchema = z
   .optional();

 // Pull request schema - accepts either string or number and converts to string
-export const pullRequestSchema = z
-  .union([z.string(), z.number()])
-  .optional()
-  .transform(numberOrStringToString);
+export const pullRequestSchema = z.string();

 // Pull request schema with nullable - for schemas that allow null values
-export const pullRequestNullableSchema = z
-  .union([z.string(), z.number()])
-  .nullable()
-  .optional()
-  .transform(numberOrStringToString);
+export const pullRequestNullableSchema = z.string();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions