CreateDPR
ChatGPTCreates a Daily Progress Report (DPR) for a project. Rules: 1. company is mandatory and must be explicitly selected by the user. 2. Require the user to select an open project for the selected company. 3. Never assume or auto-select company or project. 4. Collect Summary of Work Done, Issues / Challenges, and Attachments. 5. At least one of Summary of Work Done or Attachments is required. 6. Attachments must be image files only, with a maximum of 10 files, each less than 10 MB. 7. Upload each attachment directly to the Azure signed URL using HTTP PUT. 8. Use the attachment's correct Content-Type header while uploading. 9. After successful upload, collect uploaded attachment metadata in this format: { size, name, path, content_type, uuid }. 10. If attachment upload cannot be performed, fails, or attachment metadata cannot be obtained, inform the user that attachments cannot be uploaded currently and offer to create the DPR without attachments. 11. Never generate, assume, or fabricate attachment metadata. 12. If the user agrees to continue without attachments, ask for confirmation and create the DPR without attachments. 13. If no open projects are found for the selected company, inform the user and do not proceed. 14. Confirm all DPR details before creating the DPR. 15. On successful creation, inspect the tool response. If it contains a 'view_url', always display it prominently to the user as a clickable link with text such as "View DPR". Never hide or omit this URL.
CreateGRN
ChatGPTCreates a Goods Receipt Note (GRN) from a supplier delivery challan (PDF or image). Rules: 1. Extract supplier details, PO number and line items from the challan; the challan issuer (sender) is the supplier, not the recipient. 2. company is mandatory and must be explicitly selected by the user. Never assume or auto-select a company. 3. rec_mat_at is mandatory and must be either "Site" or "Warehouse". 4. If rec_mat_at is "Warehouse", warehouse is mandatory. List the available warehouses for the selected company and require the user to explicitly select one. Never assume or auto-select a warehouse. 5. Supplier is mandatory and must be matched against existing suppliers. If multiple matches exist, ask the user to choose. Never create or assume a supplier. 6. Only pending Purchase Order items can be received. 7. A challan may reference one or more Purchase Orders. - If PO number(s) are found in the challan, validate that they belong to the selected company and supplier. - If no PO number is found, ask the user to select one or more Purchase Orders from the available pending Purchase Orders. - The selected Purchase Orders become the scope for item matching. 8. Every challan item must be matched against pending Purchase Order items within the selected Purchase Orders only. 9. Every challan item must be fully allocated to one or more pending Purchase Order lines. - Matching must be based on PO Number, Item, and Unit. - Partial receipts are allowed. - A single challan item may be allocated across multiple pending PO lines. - Allocation should consume pending quantities sequentially until the challan quantity is fully allocated. Example 1: - Challan Item: Item A, Qty 10 - Matching Pending PO Lines: - PO-101 / Line 1: Pending Qty 5 - PO-102 / Line 2: Pending Qty 3 - PO-102 / Line 5: Pending Qty 2 Allocation: - PO-101 / Line 1 → Receive 5 - PO-102 / Line 2 → Receive 3 - PO-102 / Line 5 → Receive 2 Example 2: - Challan Item: Item A, Qty 7 - Matching Pending PO Lines: - PO-101 / Line 1: Pending Qty 5 - PO-102 / Line 2: Pending Qty 3 - PO-102 / Line 5: Pending Qty 2 Allocation: - PO-101 / Line 1 → Receive 5 - PO-102 / Line 2 → Receive 2 Remaining Pending: - PO-102 / Line 2 → 1 - PO-102 / Line 5 → 2 10. Every challan item must be completely matched at quantity level. - The total allocated quantity for a challan item must equal the challan quantity. - If the total pending quantity of matching PO lines is less than the challan quantity, stop and ask the user for review. - No challan item may remain partially matched or unmatched. 11. If no matching PO lines are found, or multiple item matches exist and the correct mapping cannot be determined, show an error and stop the GRN creation process. 12. If any mandatory information is missing, ambiguous, or cannot be validated, ask follow-up questions instead of making assumptions. 13. Before creating the GRN, present the extracted details, selected Purchase Orders, item mappings, quantity allocations, and receipt location to the user and obtain confirmation. 14. Create the GRN only after all validations pass and the user confirms the final details. 15. On successful creation, inspect the tool response. If it contains a 'view_url', always display it prominently to the user as a clickable link with text such as "View GRN". Never hide or omit this URL.
FetchOpenProjects
ChatGPTGets all open projects for the selected company.
getAllCompanies
ChatGPTGets available companies. Never assume or auto-select a company; the user must explicitly choose one.
getPendingPOItemsBySupplier
ChatGPTReturns all pending Purchase Order line items that can be received for the selected supplier and company
getProjectFinancialDetails
ChatGPTReturns financial details for all ongoing/open projects of the selected company. MANDATORY CACHE CHECK — READ BEFORE CALLING: Before invoking this tool, check if a previous response for the SAME company already exists in this conversation. If a prior response exists AND (fetched_at + cache_ttl_seconds) >= current time → DO NOT call this tool again. Reuse the cached ongoingProjects data. → When answering using cached data, explicitly tell the user that cached data was used and include the fetched_at timestamp in a human-readable format (for example, 1 July 2026, 4:00 PM or July 1, 2026, 4:00 PM). Call (or re-call) this tool ONLY if one of these is true: 1. No prior response exists for this company, OR 2. The prior response's cache has expired: (fetched_at + cache_ttl_seconds) < current time, OR 3. The prior response is missing/invalid (e.g., malformed, empty, error), OR 4. The requested company is different from the company of the cached response. Never call this tool preemptively "just to be safe" if a valid cache already satisfies the rules above — doing so wastes a call and returns identical data. Input Parameters: - company is mandatory. Response Fields: - fetched_at: exact timestamp when data was fetched/generated - cache_ttl_seconds: cache validity in seconds, usually 600 for 10 minutes - ongoingProjects: One entry per open project, containing: customer, project, project_name, master_project, project_manager, job_type, customer_po, customer_po_date, project_value, unbilled_supply, unbilled_installation, unbilled_total, billed_value, billed_percent, open_value, open_percent, estimated_cost, committed_cost, cost_incurred, cost_incurred_percent, cost_variance, cost_variance_percent, nt_value, billing_surplus, billing_surplus_percent, projected_margin_percent, ber_overbilled, reb_to_be_billed, net_cashflow, net_cashflow_percent
getSignedURLforUpload
ChatGPTGet azure signed url for uploading file
searchCustomers
ChatGPTSearch customers by one or more names (1–5 names)
searchSuppliers
ChatGPTSearch suppliers by one or more names (1–5 names)