Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.helpgenie.ai/llms.txt

Use this file to discover all available pages before exploring further.

Context sources connect your Genies to external data — via a REST API, an MCP server, or a static text document. When a source is attached to a Genie, its capabilities are discovered automatically and made available during conversations. Supported source_type values: api, mcp, text_document. Workspace members share access to their owner’s context sources.

Actions

get

Returns a single context source by ID. Parameters
FieldTypeRequiredDescription
idstringYesContext source UUID (passed as request ID)
adminModebooleanNoAdmin only — bypass ownership filter
Response
{
  "success": true,
  "data": {
    "id": "source-uuid",
    "source_type": "api",
    "config": { },
    "capabilities": [ ],
    "last_capabilities_fetch": "2024-01-01T00:00:00Z"
  }
}

list

Returns all context sources for the authenticated user, optionally filtered to sources attached to a specific Genie. Parameters
FieldTypeRequiredDescription
agentIdstringNoOnly return sources attached to this Genie
adminModebooleanNoAdmin only
Response
{
  "success": true,
  "data": [
    {
      "id": "source-uuid",
      "source_type": "mcp",
      "config": { },
      "capabilities": [ ],
      "agents": [ { "agent_id": "agent-uuid" } ]
    }
  ]
}

create

Creates a new context source and immediately fetches its capabilities from the remote endpoint. For mcp sources, credential_value is required for capability discovery. The credential is stored encrypted in the vault automatically. Parameters
FieldTypeRequiredDescription
source_typestringYes"api", "mcp", or "text_document"
configobjectYesSource-specific configuration (URL, headers, etc.)
credential_valuestringNoAPI key or bearer token — stored encrypted. Required for mcp
Response
{
  "success": true,
  "data": { /* context_sources row */ }
}

attach

Attaches an existing context source to a Genie. Parameters
FieldTypeRequiredDescription
agentIdstringYesGenie UUID
sourceIdstringYesContext source UUID
Response
{
  "success": true,
  "data": { /* context_sources row */ }
}

upsert

Creates or updates a context source and attaches it to a Genie in a single operation. Capabilities are fetched at write time. Parameters
FieldTypeRequiredDescription
agentIdstringYesGenie UUID to attach to
source_typestringYes"api", "mcp", or "text_document"
configobjectYesSource configuration
sourceIdstringNoUUID of an existing source to update; omit to create
credential_valuestringNoAPI key or bearer token. Required for mcp
Response
{
  "success": true,
  "data": {
    "id": "source-uuid",
    "source_type": "api",
    "capabilities": [ ]
  }
}

update

Updates mutable fields on a context source. Currently supports toggling is_active. Parameters
FieldTypeRequiredDescription
idstringYesContext source UUID
is_activebooleanYesEnable or disable the source
Response
{ "success": true }

delete

Detaches a context source from a Genie (removes the agent_context_source association). The source itself is not deleted. Parameters
FieldTypeRequiredDescription
agentIdstringYesGenie UUID
sourceIdstringNoSpecific source UUID to detach. Omit to detach all sources from the Genie
Response
{ "success": true }

delete-source

Permanently deletes a context source and its associated credential from the vault. Irreversible. Parameters
FieldTypeRequiredDescription
sourceIdstringYesContext source UUID
Response
{ "success": true }

refresh-capabilities

Re-fetches and updates the capability list for the context source attached to a Genie. Useful after the remote API changes. Parameters
FieldTypeRequiredDescription
agentIdstringYesGenie UUID whose attached source to refresh
Response
{
  "success": true,
  "data": {
    "capabilities": [ /* updated capability list */ ]
  }
}

Error codes

CodeMeaning
VALIDATION_ERRORMissing or invalid parameter, or unsupported source_type
NOT_FOUNDSource or agent-source association not found
UNAUTHORIZEDYou do not have access to this Genie
INTERNAL_ERRORUnexpected server error