The key in SAP OData scenarios is ontology-first. Agents should not directly compose OData URLs. They should first locate Entity Sets in the UOSE ontology, read related Entity Types, and then execute through controlled actions.Documentation Index
Fetch the complete documentation index at: https://docs.xpertai.cn/llms.txt
Use this file to discover all available pages before exploring further.
Reading Collections
Suitable questions include:- Query recently created sales orders.
- View customers under an organization.
- Filter business partners by fields.
- Use
queryEntitiesto searchsap_odata_entity_set. - Use
getEntityNeighborhoodto inspectproperties,key_schema, andquery_capabilities. - Use
discoverActionsto confirmsap_odata.read_collectionis available. - Use
simulateActionto validate select, expand, filter, and top. - Use
executeActionto read.
Reading a Single Entity
Reading a single entity requires a key. The source of truth for keys is the Entity Set’skey_schema or key properties of the related Entity Type.
Ask the Agent to confirm key fields in the neighborhood first, rather than guessing from display names.
Creating Entities
The create action is usuallysap_odata.create_entity. Before execution, confirm that:
- The Entity Set allows create.
mutationEntitySetsor metadata restrictions allow it.- Payload fields exist in Entity Type properties.
- The source system user has write permission.
- Policy does not deny it, or approval has passed.
Updating Entities
The update action is usuallysap_odata.update_entity. Before execution, confirm that:
- The key is complete.
- Fields are updatable.
- If the source system requires ETag, concurrency is handled correctly.
- The payload does not contain read-only fields.
- Policy and approval have passed.
Operation Calls
sap_odata.invoke_operation is used for unbound action imports or function imports. It is riskier than normal reads because it may trigger business side effects.
Recommendations:
- Configure it as an approval action by default.
- Make parameters and expected effect explicit in
simulateAction. - Keep operation name, parameter summary, and source system response summary in audits.
Practical Rules
- Use Entity Type properties as the source of truth for read fields.
- Always run
discoverActionsbefore executing actions. - Write actions must go through policy governance.
- Do not put SAP passwords or tokens in capabilities.
- If service discovery returns too much, use service root allowlist to narrow the scope.