Building with AI Tools
Turn a plain-English request into a valid FOQL query using AI coding assistants. We publish a machine-readable instruction file that teaches any AI tool the full FOQL grammar, the operator matrix for each field type, the validation rules, and the limits — so it generates a query you can run, not an approximation.
LLMs.txt#
Provide this URL as context to any AI tool:
| File | URL | Description |
|---|---|---|
| llms-foql.txt | facilio.com/developers/docs/foql/llms-foql.txt | Complete FOQL query-generator instructions — grammar, operator matrix, subquery and aggregate rules, limits, and worked examples. Use this URL directly with any AI tool. |
The file instructs the model to return a single JSON object — {"q": "<query>"} when it can build a query it is certain is valid, or {"q": null} when it cannot. Give the model your module and field names so it uses them exactly.
ChatGPT#
Paste the URL directly into your prompt — ChatGPT will fetch and read the content:
Read https://facilio.com/developers/docs/foql/llms-foql.txt
Now write a FOQL query for the "workorder" module that returnsid, subject, and status for all Low-priority work orders, mostrecent first, limited to 100 rows.You can also create a Custom GPT and add the URL to its configuration so every conversation has FOQL context built in.
Claude#
Use the URL with Claude's web fetch capability or paste it at the start of a Project:
Fetch https://facilio.com/developers/docs/foql/llms-foql.txtand use it as context for our conversation.
Write a FOQL query on the "workorder" module that returns the totalcost summed per category and status for Low-priority work orders,grouped by category and status.For repeated use, create a Claude Project and add the URL as a knowledge source. All conversations in that project will have FOQL context available.
Cursor / VS Code#
Reference the documentation URL directly in your prompt:
@url https://facilio.com/developers/docs/foql/llms-foql.txt
Write a FOQL query that returns id and workorder.subject from the"workorderItem" module, where the parent work order is Medium priority,limited to 5 rows.Or download llms-foql.txt into your project root — Cursor will automatically include it as context.
Tips for better results#
- Always include the URL —
https://facilio.com/developers/docs/foql/llms-foql.txt - Name the module and fields exactly — FOQL treats names as case-sensitive; "Fetch from the 'workorder' module, filter by 'priority'" gives precise output.
- State the fields you need — the query selects only what you ask for, so list the columns instead of asking for "everything".
- Give concrete filter values and date ranges — the model returns
{"q": null}rather than guess a range, so provide exact values (e.g. "created in Q1 2025", "priority = Low"). - Remember it is read-only — FOQL is
selectonly; requests to insert, update, or delete return{"q": null}.