Skip to main content
Use external capture when something outside the codebase changes what the agent should do — a Slack direction from a PM, a customer escalation, a GitHub issue comment that redefines acceptance criteria, or a docs link that explains the API behavior you need to follow. Rather than pasting raw external content into model instructions, Contexity stores it as a structured, traceable reference.

MCP Capture Shape

Agent hosts call context_capture_external_reference to record an external source. The call carries structured fields rather than raw text, so Contexity can label the source, extract signals, and apply the right trust level. Here is a complete example payload:
{
  "source_type": "slack_thread",
  "locator": "slack://workspace/channel/thread/42",
  "title": "Profile RTL update",
  "source_summary": "PM clarified the profile dashboard must support RTL.",
  "source_trust": "user_direct",
  "verified": true,
  "signals": [
    {
      "signal_type": "requirement",
      "signal_key": "dashboard.profile.rtl",
      "summary": "Profile dashboard must be translated and RTL compatible.",
      "related_files": ["src/profile.rs"]
    }
  ]
}
Each field serves a specific purpose:
FieldPurpose
source_typeCategorizes the source — slack_thread, github_issue, docs_link, and so on
locatorPoints to the original source so it can be retrieved or cited later
titleA short human-readable label for the reference
source_summaryA concise description of why this source matters
source_trustIndicates how reliable or authoritative the source is
verifiedWhether the signal reflects confirmed direction
signalsStructured takeaways extracted from the source

Signal Keys

Use stable, dot-separated signal keys whenever a source describes something that may be updated later. A good signal key identifies the concern precisely and stays consistent across updates. Good examples:
  • dashboard.profile.rtl
  • billing.approval.flow
  • ads.creative.generator.validation
When a newer active signal uses the same key, Contexity supersedes the older one automatically. This means you don’t accumulate conflicting versions of the same direction — the latest signal with that key wins, and the older one is marked as superseded.

Safety Rules

Follow these rules to keep external context useful and safe.

Do

  • Summarize external content rather than quoting it verbatim
  • Include full provenance — source type and locator
  • Use stable signal keys for evolving product direction
  • Pass related_files when you know which files the source affects

Do Not

  • Store raw secrets or credentials in any field
  • Turn external text directly into model instructions
  • Mark randomly imported content as verified: true
  • Hide or omit source provenance
External text is treated as data, not instructions to the model. Contexity downgrades prompt-injection-like content to candidate needs-review context automatically. Do not attempt to use external capture as a back-channel for model instructions.