Skip to main content
Glama
BorisSolomonia

RS.ge Waybill MCP Server

lookup_tin

Retrieve company or person names by entering their Tax Identification Number (TIN) in the RS.ge tax system. This tool provides quick identification for tax-related queries and waybill processing.

Instructions

Look up a company or person name from their TIN (Tax Identification Number) in the RS.ge system.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tinYesTax identification number (TIN) - 9 to 11 digits

Implementation Reference

  • The main handler function that executes the lookup_tin tool logic: validates the input TIN using Zod schema, calls the SOAP client's getNameFromTin method, formats the result or error message.
    export async function executeLookupTin(
      client: RsWaybillSoapClient,
      input: unknown
    ): Promise<string> {
      const logger = getLogger();
    
      try {
        // Validate input
        const validated = LookupTinInputSchema.parse(input);
    
        logger.info('Looking up TIN', { tin: validated.tin });
    
        // Call SOAP API
        const name = await client.getNameFromTin(validated.tin);
    
        if (!name || name.trim() === '') {
          return `No company or person found for TIN: ${validated.tin}`;
        }
    
        return `TIN ${validated.tin}: ${name}`;
    
      } catch (error) {
        logger.error('Error in lookup_tin tool', { error });
        return formatErrorForUser(error);
      }
    }
  • Zod schema for validating the input to the lookup_tin tool, requiring a TIN string between 9-11 characters.
    export const LookupTinInputSchema = z.object({
      tin: z.string()
        .min(9)
        .max(11)
        .describe('Tax identification number (TIN) to lookup'),
    });
    
    export type LookupTinInput = z.infer<typeof LookupTinInputSchema>;
  • MCP tool registration object defining the lookup_tin tool's name, description, and JSON input schema.
    export const lookupTinTool = {
      name: 'lookup_tin',
      description:
        'Look up a company or person name from their TIN (Tax Identification Number) ' +
        'in the RS.ge system.',
      inputSchema: {
        type: 'object' as const,
        properties: {
          tin: {
            type: 'string',
            description: 'Tax identification number (TIN) - 9 to 11 digits',
            minLength: 9,
            maxLength: 11,
          },
        },
        required: ['tin'],
      },
    };
  • src/index.ts:120-122 (registration)
    Conditional registration of the lookup_tin tool into the list returned by ListToolsRequestHandler, based on feature flag.
    if (features.getNameFromTin) {
      tools.push(lookupTinTool);
    }
  • Dispatcher case in CallToolRequestHandler that invokes the executeLookupTin handler when lookup_tin is called, checking feature flag.
    case 'lookup_tin':
      if (!features.getNameFromTin) {
        throw new Error('lookup_tin tool is disabled');
      }
      result = await executeLookupTin(soapClient, args);
      break;
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While it indicates this is a lookup operation (implying read-only), it doesn't describe authentication requirements, rate limits, error conditions, response format, or whether the data is authoritative. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

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 communicates the core purpose without any wasted words. It is appropriately sized and front-loaded, making it easy for an agent to quickly understand the tool's function.

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 moderate complexity (single parameter lookup), 100% schema coverage, and no output schema, the description is minimally adequate. It explains what the tool does but lacks details on behavioral aspects like response format or error handling, which would be helpful for an agent to use it correctly.

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?

Schema description coverage is 100%, with the parameter 'tin' fully documented in the schema (including type, description, and length constraints). The description adds no additional parameter semantics beyond what the schema provides, so the baseline score of 3 is appropriate.

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 ('Look up'), the target resource ('a company or person name'), the input source ('from their TIN'), and the system context ('in the RS.ge system'). It distinguishes this tool from sibling tools like 'get_akciz_codes' or 'get_waybills' by focusing on TIN-based entity lookup rather than code retrieval or document fetching.

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 for usage, or any exclusions. It states what the tool does but offers no context about appropriate scenarios, limitations, or how it relates to other tools in the system.

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/BorisSolomonia/MCPWaybill'

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