Skip to Content
Bonafide MCP is now generally available — read the quickstart
MCPWorked Example

Worked example

Your organization is modelled in Bonafide as one brand (a BusinessEntity) and a set of property entities (the individual hotels). Bonafide IDs follow these shapes:

RoleBonafide ID (shape)Meaning
Brand BusinessEntityHO-XXXXXXXXXXXXYour organization — the brand your key is scoped to.
PropertyHO-NNNNN-CC-RR-XXXXXXXX-NAn individual hotel (carries country/region segments).

Ask a question (bonafide_query)

Request

curl -s "https://mcp.bonafide.ai/v1/sse" \ -H "Authorization: Bearer $TOKEN" \ -H "mcp-session-id: $SID" \ -H 'Content-Type: application/json' \ -H 'Accept: application/json, text/event-stream' \ -d '{ "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "bonafide_query", "arguments": { "task": "What dining options are available at YOUR_HOTEL_NAME?", "max_documents": 5, "response_format": "text" } } }'

Response — shape (content illustrative)

{ "jsonrpc": "2.0", "id": 3, "result": { "content": [ { "type": "text", "text": "<ranked, human-readable answer assembled from the matching documents, followed by citations referencing the source entities — e.g. YOUR_HOTEL_NAME (HO-NNNNN-CC-RR-XXXXXXXX-N)>" } ] } }

Scoping with entity_name and location

When you know the specific entity (and, if the name is shared across cities, the place), pass them as structured arguments instead of relying on task alone:

{ "name": "bonafide_query", "arguments": { "task": "What is the check-in time?", "entity_name": "Hampton Inn", "location": "Maui", "response_format": "text" } }

entity_name accepts a bonafideId (most precise) or a name matched against name/alternateNames; location narrows to a city, state, or country. Combining both disambiguates a name that recurs across properties.

Browse content (bonafide_search_documents)

curl -s "https://mcp.bonafide.ai/v1/sse" \ -H "Authorization: Bearer $TOKEN" \ -H "mcp-session-id: $SID" \ -H 'Content-Type: application/json' \ -H 'Accept: application/json, text/event-stream' \ -d '{ "jsonrpc": "2.0", "id": 4, "method": "tools/call", "params": { "name": "bonafide_search_documents", "arguments": { "query": "spa", "type": "qa_pair", "category": "Hospitality", "limit": 10, "offset": 0 } } }'

Results are restricted to your organization — increment offset by limit to page through larger result sets.

List a brand’s roster (bonafide_list_entities)

Request — all properties under a brand, paginated

curl -s "https://mcp.bonafide.ai/v1/sse" \ -H "Authorization: Bearer $TOKEN" \ -H "mcp-session-id: $SID" \ -H 'Content-Type: application/json' \ -H 'Accept: application/json, text/event-stream' \ -d '{ "jsonrpc": "2.0", "id": 5, "method": "tools/call", "params": { "name": "bonafide_list_entities", "arguments": { "brand": "YOUR_BRAND_NAME", "entity_type": "property", "limit": 50, "offset": 0 } } }'

Response — shape (content illustrative)

{ "jsonrpc": "2.0", "id": 5, "result": { "content": [ { "type": "text", "text": "{\"brand\":{\"bonafide_id\":\"HO-XXXXXXXXXXXX\",\"name\":\"YOUR_BRAND_NAME\"},\"entities\":[{\"bonafide_id\":\"HO-NNNNN-CC-RR-XXXXXXXX-N\",\"name\":\"<property name>\",\"entity_type\":\"property\",\"brand_id\":\"YOUR_BRAND_NAME\",\"sub_brand_id\":null}],\"total_count\":73,\"limit\":50,\"offset\":0}" } ] } }

total_count (73 here) reflects the full roster after filtering by entity_type, not just the page returned. Increment offset by limit until you’ve paged through the full total_count. If the brand can’t be resolved in your scope, entities is [], total_count is 0, and a note field explains why — see Result completeness on the tools reference page.

With the connector from Connect from Claude enabled, you simply ask Claude in natural language — no JSON-RPC. For example:

  • “Using Bonafide, what are the check-in and check-out times at one of our hotels?”
  • “Compare the pet policies at two of our properties.”
  • “List the spa and wellness amenities across all our properties.”
  • “List every property we have under [brand name].”

Claude selects the right tool, fills the arguments, and cites the source entities in its answer.

Last updated on