AlmondTill/G3N API

suggestReason

query · in the family Reading your records

What it does

Draft a short reason for the change you are about to save — composed from what actually changed.

Suggest a short change-log reason for the edit you are about to save: the model drafts ONE plain sentence (two at most) from the change summary the office composed — what changed, and where the summary makes it obvious, why. It never invents facts beyond the summary. The answer arrives trimmed and bounded 1..256 like every stored cause reason. type is the record kind word (prompt context only); text is the change summary (<= 500 chars). Nothing auto-applies — the answer pre-fills the reason input. Refuses INTEGRATION/UNAVAILABLE while the assistant is offline/keyless — write the reason by hand. Requires authentication (user sessions). Every made call is cost-metered (at.ai.call.v1).

Before you call

A signed-in user’s session — the call refuses an API key (AUTHZ/FORBIDDEN).

Capability area: Reading your records — Looking up and listing the records of your organization.

Roles that may call it:

What happens

A drafting assist: the suggestion only fills the reason box, and nothing saves until you press Save. It never invents facts beyond your own changes. Each use makes one metered AI call.

Arguments

NameTypeRequiredNotes
typeString String!yes
textString String!yes

Returns

SuggestedReason SuggestedReason! — The reason assist's answer: ONE drafted change-log reason, trimmed and bounded like every stored cause reason. It pre-fills the reason input — nothing auto-applies.

Example request

graphql
query ExampleSuggestReason($type: String!, $text: String!) {
  suggestReason(type: $type, text: $text) {
    suggestion
  }
}

Variables:

json
{
  "type": "<type>",
  "text": "Restock before the weekend."
}

Example response

json
{
  "data": {
    "suggestReason": {
      "suggestion": "<suggestion>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer