Language: English · 中文
Tools are the only controlled entry for Agents to invoke ERP capabilities — think “buttons the AI may press”, not “SQL the AI may write”.
Implementations live in:
src/AiNativeERP.WebApi/ToolHandlers/BusinessToolHandlers.cs
src/AiNativeERP.Agent/ToolHandlers/RagToolHandlers.cs
User says…
Likely tool family
“list / how many / show”
query_* / analyze_*
“how does it work / policy / process”
query_knowledge
“create / place an order”
create_* (draft)
“approve / reject”
approve_* / workflow_approval
Every tool must:
Pass through ToolGateway / permissions / business rules
Mark writes with approval (RequiresHumanApproval)
Emit audit logs
Never expose universal SQL or arbitrary table access
Scenarios: user-scenarios.md .
Tool
Description
Typical risk
query_sales_report
Sales report
Low
analyze_sales_trend
Sales trend analysis
Low
query_sales_order
Sales order query
Low
query_customer
Customer query
Low
query_quotation
Quotation query
Low
create_quotation
Create quotation draft
Medium (confirm)
create_sales_order
Create sales order draft
High (confirm/approve)
approve_sales_order
Approve sales order
High
approve_quotation
Approve quotation
High
Tool
Description
Typical risk
query_supplier
Supplier query
Low
query_purchase_order
Purchase order query
Low
create_purchase_order
Create PO draft
High
approve_purchase_order
Approve PO
High
Tool
Description
Typical risk
query_inventory
Inventory query
Low
query_stock_alert
Stock alerts
Low
Tool
Description
Typical risk
query_invoice
Invoice query
Low
query_expense
Expense query
Low
query_payment
Payment / collection query
Low
expense_audit
Expense audit helper
Medium / High
Tool
Description
Typical risk
query_employee
Employee query
Low
query_attendance
Attendance query
Low
attendance_statistics
Attendance statistics
Low
query_salary
Salary query
High
query_leave
Leave request query
Low
Tool
Description
Typical risk
query_bom
BOM query
Low
query_production_order
Production order query
Low
create_production_order
Create production order draft
High
manage_production_order
Manage production order state
High
Workflow / General / Knowledge
Tool
Description
Typical risk
query_pending_approvals
Pending approval list
Low
workflow_approval
Approval workflow actions (sales/purchase)
High
generate_report
Report generation
Low / Medium
query_data
Controlled business data query (not universal SQL)
Low / Medium
llm_answer
Pure LLM answer (no business writes)
Low
query_knowledge
RAG retrieval (knowledge_article only)
Low
add_knowledge
Add knowledge article
Medium
Level
Requirements
Low
Permission + audit
Medium
Permission + audit + draft confirmation
High
Permission + business rules + approval/confirm + audit
Critical
Multi-level approval + full audit (payments, deletes, etc.)
Implement the business method in the Application layer (only write path)
Add a Tool Handler with ToolName, permissions, risk, approval flag
Add a matching Schema in IntentSchemaRegistry if direct routing is needed
Register in DI / Tool Registry
Add unit tests and domain-classification negatives when applicable
Update both ZH and EN versions of this doc
Related: AI governance · Intent rules