Skip to main content
Glama
pHequals7

Tracxn MCP Server

by pHequals7

get_company

Fetch detailed company information from Tracxn using a unique company identifier to access comprehensive business data and insights.

Instructions

Fetch detailed information about a company from Tracxn

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
companyIdYesThe unique identifier of the company

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
nameYes
descriptionNo

Implementation Reference

  • Executes the get_company tool: parses arguments, validates companyId, calls Tracxn API to fetch company details, handles errors, and returns JSON response.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
      if (!args) {
        throw new Error('No arguments provided');
      }
      if (name !== 'get_company') {
        throw new Error(`Unknown tool: ${name}`);
      }
      
      // Check if API key is available
      if (!process.env.TRACXN_API_KEY) {
        throw new Error('TRACXN_API_KEY environment variable is not set');
      }
      
      const toolArgs = args as unknown as ToolArgs;
      if (!toolArgs.companyId) {
        throw new Error('companyId is required');
      }
      
      try {
        const response = await tracxnClient.get(`/companies/${toolArgs.companyId}`);
        
        // Check if response is HTML (login page)
        if (typeof response.data === 'string' && response.data.includes('<!DOCTYPE html>')) {
          throw new Error('Received HTML response instead of JSON. This usually means authentication failed. Please check your API key.');
        }
        
        return {
          content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }],
          isError: false
        };
      } catch (error: any) {
        if (error.response?.status === 401) {
          throw new Error('Authentication failed. Please check your API key.');
        } else if (error.response?.status === 403) {
          throw new Error('Access forbidden. Please check your API key permissions.');
        } else if (error.response?.status === 404) {
          throw new Error(`Company with ID ${toolArgs.companyId} not found.`);
        } else {
          throw new Error(`API request failed: ${error.message}`);
        }
      }
    });
  • Defines the tool schema including input (companyId string) and output (id, name, description).
    const getCompanyTool: Tool = {
      name: 'get_company',
      description: 'Fetch detailed information about a company from Tracxn',
      inputSchema: {
        type: 'object',
        properties: {
          companyId: {
            type: 'string',
            description: 'The unique identifier of the company'
          }
        },
        required: ['companyId']
      },
      outputSchema: {
        type: 'object',
        properties: {
          id: { type: 'string' },
          name: { type: 'string' },
          description: { type: 'string' }
        },
        required: ['id', 'name']
      }
    };
  • Registers get_company tool to be discoverable via ListToolsRequest.
    server.setRequestHandler(ListToolsRequestSchema, async (request) => {
      return {
        tools: [getCompanyTool]
      };
    });
  • src/index.ts:42-42 (registration)
    Invokes registration of tools including get_company on the main MCP server instance.
    await registerTracxnTools(server);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but only mentions fetching information without details on permissions, rate limits, error handling, or response format. It lacks critical context for safe and effective use, though it doesn't contradict any annotations.

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?

The description is a single, efficient sentence that directly states the tool's purpose without any unnecessary words or structural fluff. It is appropriately sized and front-loaded, making it easy to parse quickly.

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

Completeness3/5

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

Given the tool's simplicity (one parameter, no siblings, output schema provided) and lack of annotations, the description is minimally complete but lacks depth. It covers the basic purpose but misses behavioral details that would help an agent use it effectively in varied contexts.

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

Parameters3/5

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

The schema description coverage is 100%, with the single parameter 'companyId' well-documented in the schema. The description adds no additional meaning about parameters beyond what the schema provides, so it meets the baseline for adequate but unenhanced parameter semantics.

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

Purpose4/5

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

The description clearly states the action ('Fetch detailed information') and resource ('about a company from Tracxn'), making the purpose immediately understandable. However, since there are no sibling tools mentioned, it cannot demonstrate differentiation from alternatives, which prevents a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives, prerequisites, or contextual constraints. It simply states what the tool does without any usage instructions or exclusions, leaving the agent with minimal operational context.

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/pHequals7/tracxn-mcp'

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