expense_add_vendor
Add new vendors to your financial system with essential details including contact information, payment terms, and tax ID for accurate expense tracking and reporting.
Instructions
Add a new vendor to the system
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| active | No | ||
| contactInfo | Yes | ||
| name | Yes | ||
| paymentTerms | No | Net 30 | |
| preferredPaymentMethod | No | Check | |
| taxId | No | ||
| vendorId | Yes | ||
| w9OnFile | No |
Implementation Reference
- src/tools/expense-tools.ts:80-93 (handler)The async handler function that processes the tool call, simulating vendor addition by returning a success response with vendor ID and name, or an error.handler: async (args: any): Promise<ToolResult> => { try { return { success: true, data: { vendorId: args.vendorId }, message: `Added vendor: ${args.name}` }; } catch (error) { return { success: false, error: error instanceof Error ? error.message : String(error) }; } }
- src/tools/expense-tools.ts:62-79 (schema)Input schema defining the parameters required and optional for adding a new vendor, including vendorId, name, contactInfo as required fields.inputSchema: { type: "object", properties: { vendorId: { type: "string" }, name: { type: "string" }, contactInfo: { type: "object" }, taxId: { type: "string" }, paymentTerms: { type: "string", default: "Net 30" }, preferredPaymentMethod: { type: "string", enum: ["Cash", "Check", "Credit Card", "ACH Transfer", "Wire Transfer", "PayPal", "Other"], default: "Check" }, w9OnFile: { type: "boolean", default: false }, active: { type: "boolean", default: true } }, required: ["vendorId", "name", "contactInfo"] },
- src/index.ts:32-44 (registration)Registration of all tools by aggregating tool arrays including expenseTools (containing expense_add_vendor) into allTools, which is used in MCP server request handlers for listing and calling tools.const allTools = [ ...excelTools, ...financialTools, ...rentalTools, ...expenseTools, ...reportingTools, ...cashFlowTools, ...taxTools, ...analyticsTools, ...chartTools, ...complianceTools, ...propertyTools, ];