Add filter argument to components tool#68
Conversation
42a5135 to
40e537e
Compare
40e537e to
7fd85dd
Compare
| For complete reference: | ||
| - Keys: aliases, alert_status, component_type_id, creation_source, deploy_environment, domain_id, filter_id, framework, group_ids, language, level_index, lifecycle_index, name, owner_id, owner_ids, product, properties, property, relationship, repository_ids, system_id, tag, tags, tier_index | ||
| - Types: belongs_to, contains, does_not_contain, does_not_equal, does_not_exist, does_not_match, does_not_match_regex, ends_with, equals, exists, greater_than_or_equal_to, less_than_or_equal_to, matches, matches_regex, satisfies_jq_expression | ||
| `), |
There was a problem hiding this comment.
Still can't find much in the way of concrete recommendations for tool description length, tool description vs argument description, etc. Having this detail in the top-level description should be better for planning, since most of these filters will require a bit of pre-work (fetching account metadata, team id, etc). Anywho this seems to work well and it's about as short + scannable as I can get it (yes I had AI go over it a few times).
Without a precise mapping from key <-> arg <-> predicate type, the agent will occasionally make a bad query, but the API errors are good enough that it can succeed on second shot. e.g. if it tries to query satisfies_jq_expression on a name, there will be an API error that states the supported predicate types. This is a worthy trade-off, because a complete mapping is brittle + a lot of context.
7fd85dd to
e185636
Compare
e185636 to
4c67c33
Compare
4c67c33 to
98397fb
Compare
Blocked on #69.
Problem
The
componentstool does not allow filtering, which means any queries for components must pull down all components in the account. This produces several large issues:resourceDetailsfor each individual component. Allowing filtering on these fields gets around the issue in an efficient way.Solution
Add a
filterargument to thecomponentstool.The filter is based on our recently-publicized
ServiceFilterInputin GraphQL. It takes the recursive shape of:Where a "simple" / "leaf" filter provides only
Key,Type, andArg, but a compound filter provides a list ofPredicatesalong with aConnective.To supplement usage of these filters, also adds an
accountMetadatatool. This tool is a catch-all for important contextual account information that isn't likely to be queried on its own. It takes in an array oftypeswhich determines what it queries & returns.Examples
Checklist