Adaptive limitation of the tool call

Due to the main reason for limiting the number of tool calls (excluding marketing), which is agent looping, we may consider implementing “weights” for these calls.
For example:

  • The edit tool would have a weight of 1, as it requires a significant amount of contextual information.
  • The MCP (let’s say PostgreSQL) tool would have a lower weight of 0.1, as it uses less context.
  • Read tool calls can generally be configured, with 200 rows having a weight of 1 and +/-100 rows changing this value by +/-0.2.
    This configurable weight of tool calls could allow users who pay for each tool call to manage their budget more effectively. For instance, weights could be dynamically calculated based on the number of tokens consumed. If one user gets 10,000 lines of code from 25 calls, while another gets only 100, their weights could reflect that difference.