Skip to main content
Glama

health

Verify your TestDino connection by checking PAT, account details, and listing organizations and projects. Use to confirm setup and retrieve IDs for other tools.

Instructions

Check if your TestDino connection is working. Verifies your PAT, shows your account information, and lists available organizations and projects. Use this first to make sure everything is set up correctly and to get organization/project IDs for other tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • handleHealth - Executes the health check logic: validates PAT, calls /api/mcp/hello endpoint, and returns formatted account/org/project info.
    export async function handleHealth(args?: Record<string, unknown>) {
      // Validate PAT and get user info using /api/mcp/hello endpoint
      try {
        // Read PAT from environment variable (set in mcp.json) or from args
        const token = getApiKey(args);
    
        if (!token) {
          return {
            content: [
              {
                type: "text",
                text: "❌ **Error**: Missing TESTDINO_PAT environment variable.\n\nPlease configure it in your .cursor/mcp.json file under the 'env' section.",
              },
            ],
          };
        }
    
        const helloEndpoint = endpoints.hello();
        const response = await apiRequestJson<{
          success?: boolean;
          message?: string;
          data?: {
            user: {
              id: string;
              email: string;
              firstName?: string;
              lastName?: string;
              fullName: string;
            };
            pat: {
              id: string;
              name: string;
            };
            access: Array<{
              organizationId: string;
              organizationName: string;
              projects: Array<{
                projectId: string;
                projectName: string;
                modules: {
                  testRuns: boolean;
                  manualTestCases: boolean;
                };
                permissions: {
                  canRead: boolean;
                  canWrite: boolean;
                  role: string;
                };
              }>;
            }>;
          };
        }>(helloEndpoint, {
          headers: {
            Authorization: `Bearer ${token}`,
          },
        });
    
        // Handle wrapped response structure (success helper format)
        const responseData = response.data || response;
    
        // Type guard to check if we have the expected data structure
        if (
          !responseData ||
          typeof responseData === "string" ||
          !("user" in responseData)
        ) {
          return {
            content: [
              {
                type: "text",
                text: `❌ **Error**: Unexpected response from TestDino server.\n\n${JSON.stringify(responseData)}`,
              },
            ],
          };
        }
    
        const data = responseData as {
          user: {
            id: string;
            email: string;
            firstName?: string;
            lastName?: string;
            fullName: string;
          };
          pat: {
            id: string;
            name: string;
          };
          access: Array<{
            organizationId: string;
            organizationName: string;
            projects: Array<{
              projectId: string;
              projectName: string;
              modules: {
                testRuns: boolean;
                manualTestCases: boolean;
              };
              permissions: {
                canRead: boolean;
                canWrite: boolean;
                role: string;
              };
            }>;
          }>;
        };
    
        // Format the response
        let output = `βœ… **TestDino Connection Successful!**\n\n`;
        output += `πŸ‘€ **Account**: ${data.user.fullName}\n`;
        output += `πŸ”‘ **PAT**: ${data.pat.name}\n\n`;
    
        if (!data.access || data.access.length === 0) {
          output += `⚠️ **No Organizations Found**\n\nYour PAT doesn't have access to any organizations or projects.\nPlease contact your administrator to grant access.`;
        } else {
          // Calculate totals
          const totalOrgs = data.access.length;
          const totalProjects = data.access.reduce(
            (sum, org) => sum + (org.projects?.length || 0),
            0
          );
    
          output += `πŸ“Š **Access Summary**\n`;
          output += `━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n`;
          output += `Organizations: ${totalOrgs} | Projects: ${totalProjects}\n`;
          output += `━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n`;
    
          data.access.forEach((org, orgIndex) => {
            output += `**${orgIndex + 1}. ${org.organizationName}**\n`;
            output += `   πŸ“‹ Org ID: \`${org.organizationId}\`\n`;
    
            if (org.projects && org.projects.length > 0) {
              output += `   πŸ“ Projects (${org.projects.length}):\n\n`;
    
              org.projects.forEach((project, projIndex) => {
                const accessIcon = project.permissions.canWrite ? "✏️" : "πŸ‘οΈ";
                const accessLabel = project.permissions.canWrite ? "Write" : "Read";
    
                output += `   ${orgIndex + 1}.${projIndex + 1} ${accessIcon} **${project.projectName}**\n`;
                output += `       β€’ Project ID: \`${project.projectId}\`\n`;
                output += `       β€’ Access: ${accessLabel} (${project.permissions.role})\n`;
    
                if (project.modules.testRuns) {
                  output += `       β€’ Modules: Test Runs βœ“\n`;
                }
                if (project.modules.manualTestCases) {
                  output += `       β€’ Modules: Test Case Management βœ“\n`;
                }
                output += `\n`;
              });
            } else {
              output += `   ℹ️ No projects available\n\n`;
            }
    
            // Add separator between organizations (except after the last one)
            if (orgIndex < data.access.length - 1) {
              output += `   ─────────────────────────────────────\n\n`;
            }
          });
    
          output += `\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n`;
          output += `\nHelloπŸ‘‹ ${data.user.firstName}!\n`;
          output += `You can use organisation Id and project Id in other MCP tools.\n`;
          output += `Happy Testing!πŸ˜€`;
        }
    
        return {
          content: [
            {
              type: "text",
              text: output,
            },
          ],
        };
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : String(error);
        return {
          content: [
            {
              type: "text",
              text: `❌ **Error validating PAT**\n\n${errorMessage}\n\nPlease check your PAT and try again.`,
            },
          ],
        };
      }
    }
  • healthTool definition with name 'health', description, and empty inputSchema (no required params).
    export const healthTool = {
      name: "health",
      description:
        "Check if your TestDino connection is working. Verifies your PAT, shows your account information, and lists available organizations and projects. Use this first to make sure everything is set up correctly and to get organization/project IDs for other tools.",
      inputSchema: {
        type: "object",
        properties: {},
        required: [],
      },
    };
  • src/index.ts:197-199 (registration)
    Tool call routing: routes 'health' to handleHealth(args) in the CallToolRequestSchema handler.
    if (name === "health") {
      return await handleHealth(args);
    }
  • src/index.ts:100-100 (registration)
    Tool listing: healthTool included in the tools array for ListToolsRequestSchema.
    healthTool,
  • hello() endpoint helper - returns the URL for the health check endpoint /api/mcp/hello.
    hello: (): string => {
      const baseUrl = getBaseUrl();
      return `${baseUrl}/api/mcp/hello`;
    },
Behavior5/5

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

Despite no annotations, the description fully discloses behavior: it performs read-only verification, shows account info, and lists resources. No contradictions.

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

Conciseness5/5

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

Two sentences that efficiently convey purpose and usage without extraneous information.

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

Completeness5/5

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

For a zero-parameter health check tool, the description is fully complete, covering what it does and how to use the results.

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?

No parameters required, and schema coverage is 100%. Description confirms no input needed, adding value beyond schema.

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 tool checks connection, verifies PAT, shows account info, and lists organizations and projects. It distinguishes itself from sibling CRUD tools by being a health/verification endpoint.

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?

Explicitly advises to use this tool first to verify setup and obtain organization/project IDs for other tools, providing clear when-to-use guidance relative to siblings.

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/testdino-hq/testdino-mcp'

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