Skip to main content
Glama

connector-call-test

Read-onlyIdempotent

Execute connector calls with real input parameters to test functionality and verify results using actual data.

Instructions

#Test a Connector Call

Execute a connector call with provided input parameters for testing purposes. This allows you to test connector calls with real data and see the results.

Parameter Usage:

  • Each parameter requires a "name" (the field name) and a "value" (the actual data)

  • Parameter names must match the connector call's defined parameters

  • Values can be any JSON value (string, number, boolean, object, array). The connector call specifies the expected input data type. Important: In case you miss properties in the result, check whether a datatype other than Any is assigned as output data type and whether validateOut is set to true - in this case values will be filtered to fit the datatype.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connectorNameYes
callNameYes
parametersNoInput parameters for the connector call

Implementation Reference

  • The handler function that implements the core logic of the 'connector-call-test' tool. It fetches the connector call's input parameters, matches them with provided test values (or uses constants), retrieves data types, builds a test request, calls the Simplifier client's testConnectorCall method with tracking, and formats the response as success or error with result or error details.
    }, async ({ connectorName, callName, parameters }) => {
      return wrapToolResult(`test connector call ${connectorName}.${callName}`, async () => {
        const connectorParameters =
          (await simplifier.getConnectorCall(connectorName, callName))
            .connectorCallParameters
            .filter(cparam => cparam.isInput)
        const testParameters: ConnectorTestParameter[]  = await Promise.all(connectorParameters.map(async cparam => {
          const dataType = await simplifier.getDataTypeByName(cparam.dataType.name)
          const value = parameters.find(p => p.name === cparam.name)?.value || parameters.find(p => p.name === cparam.alias)?.value || cparam.constValue
          return {
            name: cparam.name,
            constValue: cparam.constValue,
            value: value,
            alias: cparam?.alias,
            dataType: dataType,
            transfer: value !== undefined,
          } satisfies ConnectorTestParameter;
        }))
    
        const testRequest: ConnectorTestRequest = {
          parameters: testParameters
        };
    
        const trackingKey = trackingToolPrefix + toolNameConnectorCallTest
        const result = await simplifier.testConnectorCall(connectorName, callName, testRequest, trackingKey);
    
        // Format the response nicely
        if (result.success) {
          return {
            success: true,
            message: `Connector call '${callName}' executed successfully`,
            result: result.result,
          };
        } else {
          return {
            success: false,
            message: `Connector call '${callName}' execution failed`,
            error: result.error || result.message || "Unknown error",
          };
        }
      });
    });
  • Zod input schema defining the parameters for the tool: connectorName (string), callName (string), and optional parameters array each with name (string) and value (unknown JSON).
    inputSchema: {
      connectorName: z.string(),
      callName: z.string(),
      parameters: z.array(z.object({
        name: z.string().describe("Parameter name"),
        value: z.unknown().describe("Parameter value - can be any JSON value")
      })).optional().default([]).describe("Input parameters for the connector call")
    },
  • The registration of the 'connector-call-test' tool on the MCP server, including the tool name constant, call to server.registerTool with description, input schema, annotations, and handler function.
    const toolNameConnectorCallTest = "connector-call-test"
    server.registerTool(toolNameConnectorCallTest,
      {
        description: connectorTestDescription,
        inputSchema: {
          connectorName: z.string(),
          callName: z.string(),
          parameters: z.array(z.object({
            name: z.string().describe("Parameter name"),
            value: z.unknown().describe("Parameter value - can be any JSON value")
          })).optional().default([]).describe("Input parameters for the connector call")
        },
        annotations: {
          title: "Test a Connector Call",
          readOnlyHint: true,
          destructiveHint: false,
          idempotentHint: true,
          openWorldHint: true,
        },
      }, async ({ connectorName, callName, parameters }) => {
        return wrapToolResult(`test connector call ${connectorName}.${callName}`, async () => {
          const connectorParameters =
            (await simplifier.getConnectorCall(connectorName, callName))
              .connectorCallParameters
              .filter(cparam => cparam.isInput)
          const testParameters: ConnectorTestParameter[]  = await Promise.all(connectorParameters.map(async cparam => {
            const dataType = await simplifier.getDataTypeByName(cparam.dataType.name)
            const value = parameters.find(p => p.name === cparam.name)?.value || parameters.find(p => p.name === cparam.alias)?.value || cparam.constValue
            return {
              name: cparam.name,
              constValue: cparam.constValue,
              value: value,
              alias: cparam?.alias,
              dataType: dataType,
              transfer: value !== undefined,
            } satisfies ConnectorTestParameter;
          }))
    
          const testRequest: ConnectorTestRequest = {
            parameters: testParameters
          };
    
          const trackingKey = trackingToolPrefix + toolNameConnectorCallTest
          const result = await simplifier.testConnectorCall(connectorName, callName, testRequest, trackingKey);
    
          // Format the response nicely
          if (result.success) {
            return {
              success: true,
              message: `Connector call '${callName}' executed successfully`,
              result: result.result,
            };
          } else {
            return {
              success: false,
              message: `Connector call '${callName}' execution failed`,
              error: result.error || result.message || "Unknown error",
            };
          }
        });
      });
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds valuable behavioral context beyond annotations: it explains that the tool executes calls with real data for testing, and the 'Important' note clarifies result filtering based on datatype and validateOut settings. Annotations already cover read-only, open-world, idempotent, and non-destructive traits, so the description complements them without contradiction, though it could mention more about error handling or limitations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, starting with the core purpose. The bullet points and 'Important' note are structured for clarity, though the latter could be more concise. Every sentence adds value, but minor verbosity in the parameter explanation slightly reduces efficiency.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (testing with real data, 3 parameters, no output schema), the description is mostly complete: it covers purpose, usage, parameter details, and result filtering. However, it lacks information on output format, error handling, or prerequisites, which would enhance completeness for a testing tool without an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With schema description coverage at 33% (only one parameter has a description), the description compensates well by detailing parameter usage: it explains that parameters require 'name' and 'value', names must match defined parameters, and values can be any JSON value. This adds meaning beyond the sparse schema, though it doesn't fully cover all three parameters (e.g., connectorName and callName semantics).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Execute a connector call with provided input parameters for testing purposes') and resource ('connector call'), distinguishing it from sibling tools like connector-call-delete or connector-call-update. It explicitly mentions testing with real data to see results, making the purpose unambiguous and distinct.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool: for testing connector calls with real data to see results. It implicitly contrasts with sibling tools like connector-call-delete or connector-call-update by focusing on testing rather than modification or deletion, and the 'Important' note offers context on when results might be filtered, guiding usage decisions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/simplifier-ag/simplifier-mcp'

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