expense_vendor_analysis
Analyze vendor spending patterns, performance metrics, and payment terms to optimize financial decisions and identify cost-saving opportunities.
Instructions
Analyze vendor spending patterns and performance
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| analysisType | No | spending_patterns |
Implementation Reference
- src/tools/expense-tools.ts:276-291 (handler)Handler function proxies the tool call to Python module 'expense_tracking' function 'ExpenseAnalytics.vendor_analysis' using PythonBridge.handler: async (): Promise<ToolResult> => { try { const result = await pythonBridge.callPythonFunction({ module: 'expense_tracking', function: 'ExpenseAnalytics.vendor_analysis', args: [], // Would pass expenses and vendors data kwargs: {} }); return result; } catch (error) { return { success: false, error: error instanceof Error ? error.message : String(error) }; } }
- src/tools/expense-tools.ts:266-275 (schema)Input schema defining optional analysisType parameter with specific enum values.inputSchema: { type: "object", properties: { analysisType: { type: "string", enum: ["spending_patterns", "performance_metrics", "payment_terms_analysis"], default: "spending_patterns" } } },
- src/tools/expense-tools.ts:263-292 (registration)Full tool object definition for 'expense_vendor_analysis' within the expenseTools array export.{ name: "expense_vendor_analysis", description: "Analyze vendor spending patterns and performance", inputSchema: { type: "object", properties: { analysisType: { type: "string", enum: ["spending_patterns", "performance_metrics", "payment_terms_analysis"], default: "spending_patterns" } } }, handler: async (): Promise<ToolResult> => { try { const result = await pythonBridge.callPythonFunction({ module: 'expense_tracking', function: 'ExpenseAnalytics.vendor_analysis', args: [], // Would pass expenses and vendors data kwargs: {} }); return result; } catch (error) { return { success: false, error: error instanceof Error ? error.message : String(error) }; } } },
- src/index.ts:32-44 (registration)Central registration: expenseTools (containing expense_vendor_analysis) spread into allTools used by MCP server for listTools and callTool handlers.const allTools = [ ...excelTools, ...financialTools, ...rentalTools, ...expenseTools, ...reportingTools, ...cashFlowTools, ...taxTools, ...analyticsTools, ...chartTools, ...complianceTools, ...propertyTools, ];