How can I use Cursor AI to use LLMs that I have been access with?

Problem : I have a cursor rule file example (rule.mdc).
In this i have several steps, e.g.

  1. find the root folder
  2. Read the SQL file and analyze the SQL code using LLM and generate the document for the SQL file.
  3. Store the document in markdown format.

These cursor rules created python function to achieve this task

I was expecting, it will be fully autonomous agent, where it will take each sql file and use LLM to generate document. But it is asking me to use provide LLM details.
For the rule it created a python script and within that python script it is trying to use LLM api call. I get it within the script we should use LLM api only to communicate to a LLM.
But the question I am trying ask here is “What is the best approach to use cursor AI to do some systematic task like checking for files, verifying the files format and data to produce structured prompt and use LLM for analysing. The response then has to be saved in certain format and in certain ways, which can be programmed.”

Please let me know if you need any information from me to answer or proceed for discussion.