Skip to main content
Glama
daanno

Simplicate MCP Server

by daanno

get_mileage

Retrieve mileage records from Simplicate business data to track and manage travel expenses for projects and clients.

Instructions

Retrieve mileage records

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo

Implementation Reference

  • The getMileage method retrieves mileage data from the Simplicate API endpoint '/costs/mileage'. It handles optional pagination parameters and gracefully returns an empty array on error.
    async getMileage(params?: { limit?: number; offset?: number }): Promise<SimplicateMileage[]> {
      try {
        const response = await this.client.get('/costs/mileage', params);
        return response.data || [];
      } catch (error) {
        // Mileage endpoint may require specific filters
        console.warn('getMileage: endpoint returned error, returning empty array');
        return [];
      }
  • TypeScript interface defining the structure of SimplicateMileage objects returned by getMileage.
    export interface SimplicateMileage {
      id: string;
      employee?: { id: string; name: string };
      project?: { id: string; name: string };
      distance: number;
      date: string;
      rate: number;
    }
  • Dynamic tool handler in HTTP MCP server that converts snake_case tool names like 'get_mileage' to camelCase method 'getMileage' on SimplicateServiceExtended and executes it with parsed arguments.
    async function dispatchTool(toolName: string, args: any) {
      const method = toMethodName(toolName);
      // heuristic param extraction
      const params: any[] = [];
      if (args && typeof args === 'object') {
        // common id patterns
        const idKeys = ['project_id','organization_id','person_id','task_id','service_id','invoice_id','id'];
        let foundId = false;
        for (const k of idKeys) {
          if (k in args) {
            params.push(args[k]);
            foundId = true;
            break;
          }
        }
        if (args.data) params.push(args.data);
        if (!foundId && params.length === 0) params.push(args);
      } else if (args !== undefined) {
        params.push(args);
      }
    
      // @ts-ignore - dynamic call
      if (typeof (service as any)[method] === 'function') {
        // call and return
        // Some methods expect a single primitive id; spread params
        return await (service as any)[method](...params);
      }
    
      throw new Error(`Unknown tool/method: ${toolName} -> ${method}`);
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. 'Retrieve' implies a read operation, but it doesn't disclose behavioral traits like authentication needs, rate limits, pagination behavior (implied by limit/offset params but not explained), or what happens on errors. It's minimal and lacks critical context for safe use.

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 very concise ('Retrieve mileage records')—a single phrase with no wasted words. It's front-loaded and to the point, though arguably too brief given the lack of detail needed for other dimensions. Efficiency is high, but it borders on under-specification.

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

Completeness2/5

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

Given the tool's complexity (2 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain the purpose in depth, usage context, parameter meanings, or expected return values. For a retrieval tool with pagination parameters, more detail is needed to guide the agent effectively.

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

Parameters2/5

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

The input schema has 2 parameters (limit, offset) with 0% description coverage, so the schema provides no semantic info. The description doesn't mention parameters at all, failing to compensate for the coverage gap. It should explain what limit and offset do in the context of retrieving mileage records, but adds no value beyond the schema.

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

Purpose3/5

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

The description 'Retrieve mileage records' clearly states the action (retrieve) and resource (mileage records), which is adequate. However, it doesn't differentiate from sibling tools like 'get_costs' or 'get_invoices' beyond the resource name, making it somewhat vague in context. It's not tautological but lacks specificity about what 'mileage records' entail.

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. There are many sibling 'get_' tools (e.g., 'get_costs', 'get_invoices'), but it doesn't specify scenarios, prerequisites, or exclusions. This leaves the agent without context for selection, though it's not misleading.

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/daanno/simplicate-mcp'

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