Skip to main content
Glama

get_contracts

Retrieve contract data from Simplicate business systems to access agreement details, terms, and associated information for business operations.

Instructions

Retrieve contracts

Input Schema

NameRequiredDescriptionDefault
limitNo
offsetNo

Input Schema (JSON Schema)

{ "properties": { "limit": { "type": "number" }, "offset": { "type": "number" } }, "type": "object" }

Implementation Reference

  • Tool registration for 'get_contracts' including input schema definition
    name: 'get_contracts', description: 'Retrieve contracts', inputSchema: { type: 'object', properties: { limit: { type: 'number' }, offset: { type: 'number' }, }, }, },
  • MCP server handler for get_contracts tool call, delegates to SimplicateServiceExtended.getContracts with pagination params
    case 'get_contracts': { const data = await this.simplicateService.getContracts({ limit: (toolArgs.limit as number) || 10, offset: (toolArgs.offset as number) || 0, }); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }; }
  • Core helper method implementing contract retrieval via Simplicate API endpoint /crm/contract, with error handling and pagination
    async getContracts(params?: { limit?: number; offset?: number }): Promise<SimplicateContract[]> { try { const response = await this.client.get('/crm/contract', params); return response.data || []; } catch (error) { // Contracts endpoint may not be available or requires specific filters console.warn('getContracts: endpoint returned error, returning empty array'); return []; } }
  • TypeScript interface defining the SimplicateContract return type structure used by getContracts
    export interface SimplicateContract { id: string; contract_number: string; organization?: { id: string; name: string }; start_date: string; end_date?: string; status: string; }

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