Docs

Tools: context

61 tool(s) in this category.

author_profile.get

Get Author Profile

Fetch a single author profile by UUID, including the attached writing samples and LinkedIn scraped profiles. Use when the agent already has an id (from list or input_params) and wants the richer detail view. Every writing-sample + scraped-profile entry in the response carries its content_role enum (author_voice | inspirational) so the settings UI can render per-association toggles without a second fetch. Returns null when not found or when the profile belongs to a different business.

  • HTTP: (not exposed as REST)
  • Required scopes: context:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0

Input

FieldTypeRequiredDescription
idstringyes

author_profile.list

List Author Profiles

List author profiles for this business (self, team, and external inspirational authors). Use when populating the v2 content creation Author selector, or before calling content_writer. Accepts voice_only=true to hide external-only profiles. Each profile carries writing_samples + scraped_profiles arrays; every entry includes its content_role (author_voice | inspirational).

  • HTTP: (not exposed as REST)
  • Required scopes: context:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0

Input

FieldTypeRequiredDescription
voice_onlystringno

authors.create

Create Author Profile

Persist a brand-new author_profiles row for the caller's workspace. Call when the settings page collects a name (required) plus optional role title and relationship tag (self | team | external). Voice regeneration does NOT run at creation time — attach writing samples or scraped LinkedIn profiles first, then open the detail drawer to trigger the async voice learning pipeline.

  • HTTP: (not exposed as REST)
  • Required scopes: config:write
  • Required role: editor
  • Stability: stable
  • Version: 1.0
  • Tags: authors, create

Input

FieldTypeRequiredDescription
businessIdstringno
namestringyes
rolestringno
relationship`enum("self""team""external")`

authors.delete

Delete Author Profile

Permanently remove an author_profiles row owned by the caller's workspace. Call when an operator wants to retire a teammate or an external inspiration entry whose voice should no longer drive content. Junction rows on author_profile_writing_samples and author_profile_scraped_profiles cascade via foreign-key ON DELETE; the legacy nullable author_id on writing_samples and scraped_posts is left behind with NULL. Destructive — UI should prompt for confirmation first.

  • HTTP: (not exposed as REST)
  • Required scopes: config:write
  • Required role: admin
  • Stability: stable
  • Version: 1.0
  • Tags: authors, delete, destructive

Input

FieldTypeRequiredDescription
businessIdstringno
authorIdstringyes

authors.get

Get Author Profile With Voice Status

Fetch one author_profile row joined to its writing-sample and scraped-profile junctions, returned alongside a voice ResourceStatus envelope. Read when the settings Authors tab opens a detail drawer. If the author has samples attached but no cached voice and no in-flight regen, this reader auto-enqueues a voice_regen job — the caller immediately polls voice_status. Returns null author when the id is missing or cross-tenant.

  • HTTP: (not exposed as REST)
  • Required scopes: config:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0

Input

FieldTypeRequiredDescription
idstringyes

authors.linkedin_status

Poll LinkedIn Scrape Job Status

Read-only polling surface for a LinkedIn scrape / refresh job. Use when a UI indicator needs to tick without risking a new enqueue — this handler never spawns work. Returns the { linkedin_scrape: ResourceStatus<ScrapedProfileRow> } envelope; when status=ready, data carries the resolved author_profile_scraped_profiles junction row (including content_role). When status=loading, progress carries the staged worker message ("Scraping", "Extracting", "Persisting").

  • HTTP: (not exposed as REST)
  • Required scopes: config:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0
  • Tags: authors, linkedin, polling, status

Input

FieldTypeRequiredDescription
businessIdstringno
jobIdstringyes

authors.list

List Author Profiles With Counts

Enumerate every author profile registered for the caller's workspace along with per-author junction-row counts (writing samples, scraped LinkedIn profiles, voice-vs-inspirational breakdowns). Read when rendering the settings Authors tab list view or picking an author UUID before a subsequent PATCH/DELETE. Response is a flat array sorted alphabetically by name; empty when nothing is registered yet.

  • HTTP: (not exposed as REST)
  • Required scopes: config:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0

Input

No structured input.

authors.refresh_linkedin

Refresh LinkedIn Profile Scrape

Idempotently re-run a LinkedIn scrape for an existing author_profile_scraped_profiles junction row, keyed by scrapedProfileId. Use when the operator wants to pull fresh posts for a LinkedIn profile already attached to an author. Dedup on (scrapedProfileId, authorId): returns 'already_running' when a refresh is in flight. Uses a 14-day lookback and preserves the existing content_role.

  • HTTP: (not exposed as REST)
  • Required scopes: config:write
  • Required role: editor
  • Stability: stable
  • Version: 1.0
  • Tags: authors, linkedin, refresh, async, idempotent

Input

FieldTypeRequiredDescription
businessIdstringno
authorIdstringyes
scrapedProfileIdstringyes

authors.regenerate_voice

Regenerate Author Voice Profile

Kick off the LLM voice-analysis pipeline for one author, returning a background jobId so the UI can poll progress. Call when an operator clicks Regenerate or after a fresh sample lands. Idempotent on (businessId, authorId): a second invocation while an earlier job is pending or in_progress returns the original jobId with status='already_running'. The summary lands on cached_voice_profile — callers poll voice_status, never receive it here.

  • HTTP: (not exposed as REST)
  • Required scopes: config:write
  • Required role: editor
  • Stability: stable
  • Version: 1.0
  • Tags: authors, voice, async, idempotent

Input

FieldTypeRequiredDescription
businessIdstringno
authorIdstringyes
channelstringno

authors.scrape_linkedin

Scrape LinkedIn Profile for Author

Idempotently start an async LinkedIn profile scrape and attach it to an author_profile via the author_profile_scraped_profiles junction. Use when adding a new LinkedIn author_voice source to a team author. Dedup key is (businessId, authorId, url): returns 'already_running' with the existing jobId if the same scrape is in flight. The junction row lands with content_role=author_voice after the linkedin-scrape worker finishes.

  • HTTP: (not exposed as REST)
  • Required scopes: config:write
  • Required role: editor
  • Stability: stable
  • Version: 1.0
  • Tags: authors, linkedin, async, idempotent

Input

FieldTypeRequiredDescription
businessIdstringno
authorIdstringyes
urlstringyes

authors.set_scraped_profiles

Replace Author Scraped Profile Associations

Overwrite the author's scraped-LinkedIn-profile junction rows with the provided author_name list. Invoke when the settings drawer saves a reshuffled source list. author_name is the identifier because scraped posts predate junction UUIDs. Names with zero scraped_posts in the workspace are rejected with code=unknown_profile so a voice profile never lands without training data. Rows persist under content_role=author_voice; scraped_posts.author_id is dual-written.

  • HTTP: (not exposed as REST)
  • Required scopes: config:write
  • Required role: editor
  • Stability: stable
  • Version: 1.0
  • Tags: authors, scraped_profiles, associations, replace

Input

FieldTypeRequiredDescription
businessIdstringno
authorIdstringyes
profileIdsarray<string>yes

authors.set_writing_samples

Replace Author Writing Sample Associations

Overwrite the caller's author-profile writing_samples junction with the exact array of sample UUIDs provided. Invoke when the settings page saves a reshuffled sample list for one author — the op clears existing rows and inserts replacements under content_role=author_voice (author associations are voice-only by design). Sample ids belonging to another business are rejected with code=cross_business. Dual-writes the legacy writing_samples.author_id column.

  • HTTP: (not exposed as REST)
  • Required scopes: config:write
  • Required role: editor
  • Stability: stable
  • Version: 1.0
  • Tags: authors, writing_samples, associations, replace

Input

FieldTypeRequiredDescription
businessIdstringno
authorIdstringyes
sampleIdsarray<string>yes

authors.update

Update Author Profile Fields

Patch one or more mutable fields (name, role, relationship) on an existing author_profile row. Invoke when the settings drawer saves an edit to a teammate's title or reclassifies someone from external inspiration to team voice source. At least one of name / role / relationship must be present in the payload; an empty patch is rejected up-front with a 400 rather than silently succeeding.

  • HTTP: (not exposed as REST)
  • Required scopes: config:write
  • Required role: editor
  • Stability: stable
  • Version: 1.0
  • Tags: authors, update

Input

FieldTypeRequiredDescription
businessIdstringno
authorIdstringyes
namestringno
rolestringno
relationship`enum("self""team""external")`

authors.update_scraped_profile_role

Update Scraped Profile Content Role

Flip the content_role on an author_profile_scraped_profiles junction row between author_voice and inspirational. Use when promoting a scraped LinkedIn profile from an inspirational reference into an active author_voice source, or demoting back. Only the content_role column is mutated. Returns structured codes: invalid_content_role (400), not_found (404).

  • HTTP: (not exposed as REST)
  • Required scopes: config:write
  • Required role: editor
  • Stability: stable
  • Version: 1.0
  • Tags: authors, linkedin, content_role, junction

Input

FieldTypeRequiredDescription
businessIdstringno
authorIdstringyes
profileIdstringyes
content_role`enum("author_voice""inspirational")`yes

authors.update_writing_sample_role

Update Writing Sample Content Role

Flip the content_role on an author_profile_writing_samples junction row between author_voice and inspirational. Use when reclassifying an attached writing sample between a voice training sample and a structural inspirational reference. Only the content_role enum is mutated; the author ↔ sample pairing is unchanged. Returns structured codes: invalid_content_role (400), not_found (404).

  • HTTP: (not exposed as REST)
  • Required scopes: config:write
  • Required role: editor
  • Stability: stable
  • Version: 1.0
  • Tags: authors, writing_samples, content_role, junction

Input

FieldTypeRequiredDescription
businessIdstringno
authorIdstringyes
sampleIdstringyes
content_role`enum("author_voice""inspirational")`yes

authors.voice_status

Poll Author Voice Regen Status

Return the current voice ResourceStatus for one author without spawning any new work. Use for fast-cadence polling from the settings detail drawer while a voice_regen job is in flight. Response carries status ∈ {loading, ready, failed}, the underlying jobId when a worker is active, the last-updated timestamp, progress text when the worker has emitted a stage marker, and data=cached_voice_profile when status is ready.

  • HTTP: (not exposed as REST)
  • Required scopes: config:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0
  • Tags: authors, voice, polling, status

Input

FieldTypeRequiredDescription
businessIdstringno
authorIdstringyes

business_profile.get

Get Business Profile

Fetch this workspace's business profile with an auto-enqueue guarantee. Returns the ResourceStatus envelope { status, data, jobId, lastUpdated, progress, error }. If the profile is missing and no refresh is already running, a discovery job is enqueued and status='loading' with the fresh jobId is returned. Safe to poll — the handler never spawns duplicate jobs.

  • HTTP: (not exposed as REST)
  • Required scopes: config:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0
  • Tags: business_profile, auto-load

Input

FieldTypeRequiredDescription
businessIdstringnoWorkspace id. Defaults to the caller context businessId.

business_profile.get_schedule

Get Business Profile Sync Schedule

Fetch the auto-discovery sync schedule (enabled flag, frequency weekly/biweekly/monthly, freshness threshold in days, refresh-existing-profiles toggle) for this workspace. Use when rendering the Sync Schedule settings page or deciding whether a cron run should skip. Pure read — no side effects.

  • HTTP: (not exposed as REST)
  • Required scopes: config:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0
  • Tags: business_profile, schedule

Input

FieldTypeRequiredDescription
businessIdstringno

business_profile.read

Read Business Profile

Read the signed-in workspace's stored business profile (company, industry, ICP, content themes, and competitors) as a ResourceStatus envelope. Read when an agent needs to know who it is working for before drafting or researching. If the profile is missing, a discovery refresh is enqueued automatically and a loading status comes back; poll until ready.

  • HTTP: (not exposed as REST)
  • Required scopes: config:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0

Input

No structured input.

business_profile.refresh

Refresh Business Profile

Trigger a profile-only discovery run that rewrites the stored business profile from current web signals. Use when the operator wants to force a fresh regeneration without rescraping author sources. If a job is already running the existing jobId is returned under status='already_running' — no second job ever spawns.

  • HTTP: (not exposed as REST)
  • Required scopes: config:write
  • Required role: editor
  • Stability: stable
  • Version: 1.0
  • Tags: business_profile, async, idempotent

Input

FieldTypeRequiredDescription
businessIdstringno

business_profile.refresh_sources

Refresh Business Profile Sources

Kick off a full-discovery pipeline (profile regeneration plus author source inspection + scraping). Use when the operator wants to bring every discovered source back up to date, not just the profile. Respects freshnessThresholdDays so sources younger than that window are left alone. Idempotent — returns the running jobId if one is already executing.

  • HTTP: (not exposed as REST)
  • Required scopes: config:write
  • Required role: editor
  • Stability: stable
  • Version: 1.0
  • Tags: business_profile, async, idempotent, sources

Input

FieldTypeRequiredDescription
businessIdstringno
refreshExistingProfilesbooleannoWhen true, rescrape sources even if they look fresh. Defaults to false.
freshnessThresholdDaysintegernoDays a source can go un-touched before this run will re-fetch it.

business_profile.status

Poll Business Profile Job Status

Read-only polling surface for the business profile refresh job. Use when a progress indicator needs to tick without risking a new enqueue — this handler never spawns work, unlike business_profile.get. Returns the same ResourceStatus envelope (status, data, jobId, lastUpdated, progress, error).

  • HTTP: (not exposed as REST)
  • Required scopes: config:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0
  • Tags: business_profile, status, polling

Input

FieldTypeRequiredDescription
businessIdstringno

business_profile.update

Update Business Profile

Patch the stored business profile with a user-edited partial payload. Use when the operator hand-corrects discovery output (company name, industry, ICP, competitors, content themes, keywords). The patch is deep-merged into the existing profile and stamped source=user_edited. Returns the fully-merged row.

  • HTTP: (not exposed as REST)
  • Required scopes: config:write
  • Required role: editor
  • Stability: stable
  • Version: 1.0
  • Tags: business_profile, write

Input

FieldTypeRequiredDescription
businessIdstringno
profileobjectyesPartial BusinessProfile — any subset of companyName, industry, subIndustry, icp, contentThemes, competitors, industryKeywords, keyCommunitiesAndMedia, mustFollowLeaders.

business_profile.update_schedule

Update Business Profile Sync Schedule

Persist a new auto-discovery sync schedule for this workspace. Use when the operator toggles enabled, changes frequency between weekly / biweekly / monthly, adjusts the freshness threshold in days, or flips the refresh-existing-profiles flag. Rewires the BullMQ repeatable job so the next cron tick uses the new cadence.

  • HTTP: (not exposed as REST)
  • Required scopes: config:write
  • Required role: editor
  • Stability: stable
  • Version: 1.0
  • Tags: business_profile, schedule, write

Input

FieldTypeRequiredDescription
businessIdstringno
enabledbooleanyes
frequency`enum("weekly""biweekly""monthly")`
freshnessThresholdDaysintegeryes
refreshExistingProfilesbooleanyes

context_entries.write

Write Context Entry

Create, update, or delete a persisted context entry. Use when saving, patching, or removing brand config / audience insights / campaign themes. action="create" requires type+title+content; action="update" requires id and at least one of title/content; action="delete" requires id. Reads use the context_entry:// resource (via read_resource).

  • HTTP: POST /context/entries/write
  • Required scopes: context_entries:write
  • Required role: editor
  • Stability: stable
  • Version: 1.0
  • Tags: write, persistent

Input

FieldTypeRequiredDescription
action`enum("create""update""delete")`
idstringnoEntry UUID. Required for update / delete.
typestringnoDotted type identifier (e.g. "brand.colors"). Required for create.
titlestringnoHuman-readable title. Required for create; optional for update.
contentobjectnoArbitrary structured content. Required for create; optional for update.
source`enum("manual""auto_detected""imported")`

context_entry.get

Get Context Entry

Fetch a single persisted context entry by its type id (e.g. brand.colors, voice.default). Use when the caller already knows the entry id and wants the full blob. Returns null when the entry does not exist.

  • HTTP: (not exposed as REST)
  • Required scopes: context_entries:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0

Input

FieldTypeRequiredDescription
idstringyes

context_entry.list

List Context Entries

List persisted context entries (brand.colors, brand.voice_rules, voice.* profiles, etc.). Use when loading brand metadata before writing content or auditing what canonical context a business has stored. Supports a type_prefix filter (e.g. brand., voice.) and offset-based pagination.

  • HTTP: (not exposed as REST)
  • Required scopes: context_entries:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0

Input

FieldTypeRequiredDescription
type_prefixstringno
limitintegerno
offsetintegerno

context.ask

Ask Over Session Substrate

Get a synthesized natural-language answer over the data already gathered in the current session. An agent searches the accumulated substrate (evidence, clusters, metrics) and optionally the web, then writes a complete response. Use AFTER gathering data with the data tool, not as a starting point. Takes ~10-15 seconds. For raw scored results instead of a written answer, use query_substrate.

  • HTTP: POST /context/ask
  • Required scopes: context:ask
  • Required role: viewer
  • Stability: stable
  • Version: 1.0
  • Tags: read-only, session, long-running, agent-loop

Input

FieldTypeRequiredDescription
querystringyesThe question to answer using the agent loop over session data.

context.audience_filters

List Audience Filter Options

Return the per-business audience filter options (funnel stages, account sizes, personas, industries, topics) sourced from the v2 BigQuery catalog. Use when populating the audience picker in content creation or research setup, or when the agent wants to validate a user-supplied audience_filters map before delegating. Returns an empty option set for each category when the business has no interactions data yet.

  • HTTP: (not exposed as REST)
  • Required scopes: context:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0

Input

No structured input.

context.channels

List Canonical Channels

Return the canonical channel enum (linkedin, blog, twitter, youtube, email, other) used by content_sessions.channel and the content_writer specialist's input_params.channel. Use when populating a channel selector in a filter UI or when the agent needs to validate a user-supplied channel string.

  • HTTP: (not exposed as REST)
  • Required scopes: context:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0

Input

No structured input.

context.content_subtypes

List Canonical Content Subtypes

Return the canonical content-subtype enum (perspective, proof, execution, how_to, announcement, teardown) stored on content_sessions.content_subtype and threaded through content_writer.input_params.content_subtype. Use when rendering the subtype filter or when the agent needs to map a user's framing onto the pipeline's structural categories.

  • HTTP: (not exposed as REST)
  • Required scopes: context:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0

Input

No structured input.

context.content_types

List Canonical Content Types

Return the canonical content-type enum (social, blog, thought_leadership, newsletter, case_study) recognised by the v2 pipeline and the content_writer specialist's input_params.content_type. Use when populating a content-type selector or when the agent needs to confirm a user-supplied type is valid before delegating.

  • HTTP: (not exposed as REST)
  • Required scopes: context:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0

Input

No structured input.

context.query_substrate

Query Session Substrate

Intent-driven smart lookup over the session substrate. Returns scored/ranked evidence, clusters, and metrics tailored to an intent. Use this to retrieve grounded data points, not to compose a narrative. Intents: answer_question, find_metrics, research_overview, summarize_research, evidence_for_writing, enrich_with_quotes, assess_viability. Prefer query_substrate over ask when you need raw scored results.

  • HTTP: POST /context/substrate/query
  • Required scopes: context:query
  • Required role: viewer
  • Stability: stable
  • Version: 1.0
  • Tags: read-only, session, retrieval

Input

FieldTypeRequiredDescription
intent`enum("answer_question""find_metrics""research_overview"
querystringnoFree-text keyword query. Drives matching against evidence, clusters, and metrics. Optional.
limitnumbernoMax results per category. Each intent has sensible defaults; override only when needed.
source_filter`array<enum("bigquery""cluster""kg"

context.remember

Remember Observation

Push an external observation (web finding, user note, summary from another tool) into the session substrate so subsequent query_substrate and ask calls surface it. Use for findings that belong in the substrate but did not come from the standard data pipeline. The observation is appended, not deduplicated against existing evidence.

  • HTTP: POST /context/remember
  • Required scopes: context:write
  • Required role: editor
  • Stability: stable
  • Version: 1.0
  • Tags: write, session, destructive

Input

FieldTypeRequiredDescription
textstringyesThe observation text to store as session evidence. Max 4000 characters.
source`enum("web""kg""reference_doc"
company_namestringnoOptional company attribution for the observation.

context.review_kit

Context Review Kit

Use after completing a blueprint run when you want to update the business's long-term context. Returns: the run's audit row (inputs/outputs/step_states/errors), the current auto_detected context entries (capped at 100 most-recent), the count of manual entries you must NOT modify, the last 10 entries changed for trend awareness, and the curation rubric inline. Bundles three reads into one so the post-run curation playbook stays single-shot. Read-only — apply changes via context_entries.write.

  • HTTP: POST /context/review-kit
  • Required scopes: context_entries:read, workflows:read
  • Required role: viewer
  • Stability: beta
  • Version: 1.0
  • Tags: read, curation, blueprint

Input

FieldTypeRequiredDescription
blueprint_run_idstringnoOptional UUID of the blueprint_run you just completed. When supplied, the kit's run field is populated with that run's audit row. When omitted, run is null and the kit returns context surfaces only (useful for ad-hoc curation outside a run lifecycle).

context.substrate

Session Substrate

Session substrate counters: what the agent has learned so far in this run (record counts, entities discovered, data sources consulted). Use when debugging what substrate has been gathered or deciding whether to gather more before answering.

  • HTTP: (not exposed as REST)
  • Required scopes: context:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0

Input

No structured input.

context.summary

Business Context Summary

Business profile summary (company, voice, channel assets) aggregated from the core context tables. Use when the agent is orienting at turn 0 and needs "who am I working for". Read once per run; the answer is static within a turn.

  • HTTP: (not exposed as REST)
  • Required scopes: context:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0

Input

No structured input.

context.time_ranges

List Canonical Time Ranges

Return the canonical research time-range enum (last_7d, last_30d, last_90d, last_180d, last_365d, all_time, custom). Use when rendering the research-window filter or when the agent needs a preset id to map to researcher.input_params.research_start_date / research_end_date. The 'custom' sentinel signals the caller should supply explicit ISO dates instead of a preset window.

  • HTTP: (not exposed as REST)
  • Required scopes: context:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0

Input

No structured input.

inspirational_reference.get

Get Inspirational Reference

Fetch a single inspirational reference by composite id ('writing_sample:<uuid>' or 'scraped_post:<uuid>'). Use when the agent already has the id (from list or input_params) and wants the full body, or when rendering a reference detail modal. Returns null when the composite id is malformed or the reference does not exist in this business.

  • HTTP: (not exposed as REST)
  • Required scopes: context:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0

Input

FieldTypeRequiredDescription
idstringyes

inspirational_reference.list

List Inspirational References

List every writing sample + scraped post available as a structural inspirational reference for this business. Use when populating the v2 content creation Inspirational picker or when the agent needs a pool to choose from before calling content_writer. Returns composite ids of shape 'writing_sample:<uuid>' and 'scraped_post:<uuid>' suitable for inspirational_reference_id input_params.

  • HTTP: (not exposed as REST)
  • Required scopes: context:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0

Input

FieldTypeRequiredDescription
limitintegerno
kind`enum("writing_sample""scraped_post")`no

inspirational_reference.search

Search Inspirational References

Substring-search writing samples and scraped posts by title + body. Use when the user asks for an inspirational reference by topic or keyword and the agent needs to shortlist candidates before delegating to content_writer. Accepts q (required) and limit (default 20, max 100). Returns composite ids alongside preview snippets.

  • HTTP: (not exposed as REST)
  • Required scopes: context:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0

Input

FieldTypeRequiredDescription
qstringyes
limitintegerno

prompts.context.capture_competitive_intel

Capture Competitive Intel Prompt

Use when the agent observes something about a named competitor that future sessions should remember (positioning move, pricing change, win/loss signal). Directs the caller to save it under competitive.<slug> with structured content so the v2 Context page and future battlecards can reuse it.

  • HTTP: (not exposed as REST)
  • Required scopes: context_entries:write
  • Required role: viewer
  • Stability: stable
  • Version: 1.0
  • Tags: prompt, context, entries, competitive

Input

FieldTypeRequiredDescription
competitorstringyesName of the competitor (e.g. Zendesk, Intercom).
observationstringyesWhat was observed about the competitor.
evidencestringnoWhere this came from (customer call, competitor website, news article).

prompts.context.onboard_me

Onboard Me Prompt

Use when a first-time caller asks "what can this do" or wants a guided orientation. Directs the agent to read context://summary, data://schema, and knowledge_base://list and produce a welcome brief that names what is connected and what to try first.

  • HTTP: (not exposed as REST)
  • Required scopes: context:read, data:read, knowledge_base:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0
  • Tags: prompt, context, orientation

Input

No structured input.

prompts.context.remember_this

Remember This Prompt

Use when the user surfaces an observation from outside the normal data pipeline (web find, human note) and wants it to influence future substrate queries. Directs the agent to call context.remember with the observation plus a typed source tag.

  • HTTP: (not exposed as REST)
  • Required scopes: context:write
  • Required role: viewer
  • Stability: stable
  • Version: 1.0
  • Tags: prompt, context, memory

Input

FieldTypeRequiredDescription
observationstringyesFact to remember.
source`enum("web""kg""reference_doc"

prompts.context.review_context

Review Context Prompt

Use when the user (or an agent before starting a task) wants a health check of the context_entries long-term memory store. Directs the caller to list entries, group by type prefix, summarise content, and flag duplicates or stale rows. Proposes next CRUD moves but does not mutate.

  • HTTP: (not exposed as REST)
  • Required scopes: context_entries:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0
  • Tags: prompt, context, entries, review

Input

FieldTypeRequiredDescription
type_prefixstringnoOptional type prefix to narrow the review (e.g. audience, competitive). Omit to review all entries.

prompts.context.save_insight

Save Insight Prompt

Use when the agent discovers a stable business truth during a conversation that future sessions should remember. Directs the caller to persist the finding as a context_entries row with the right type prefix and auto_detected source, so the v2 Context page and other agents see it.

  • HTTP: (not exposed as REST)
  • Required scopes: context_entries:write
  • Required role: viewer
  • Stability: stable
  • Version: 1.0
  • Tags: prompt, context, entries

Input

FieldTypeRequiredDescription
observationstringyesThe business truth to persist.
categorystringnoHint for the type prefix. One of: audience, competitive, positioning, campaign, goals, notes. Unknown values fall back to notes.
titlestringnoShort human-readable title for the entry (1 line).

prompts.context.state_of_business

State Of Business Prompt

Use when the user asks for a high-level current status of the business. Directs the agent to query the substrate for recent themes and read the 10 newest artifacts, then compose a one-page snapshot of active work and signals.

  • HTTP: (not exposed as REST)
  • Required scopes: context:read, artifacts:read, context:query
  • Required role: viewer
  • Stability: stable
  • Version: 1.0
  • Tags: prompt, context, status

Input

No structured input.

prompts.context.update_entry

Update Entry Prompt

Use when an existing context_entries row needs a targeted change (new evidence, corrected fact, expanded detail). Directs the caller to read the entry first, apply the change without clobbering unrelated fields, and refuse to modify source:"manual" entries.

  • HTTP: (not exposed as REST)
  • Required scopes: context_entries:write
  • Required role: viewer
  • Stability: stable
  • Version: 1.0
  • Tags: prompt, context, entries

Input

FieldTypeRequiredDescription
idstringyesUUID of the entry to update.
changestringyesPlain-English description of the change to apply (what to add, correct, or clarify).

prompts.knowledge_base.brief_me

Brief Me Prompt

Use when the user wants a short RAG briefing drawn from the knowledge base on a specific topic. Directs the agent to search the KB and compose a grounded summary with source attribution (on MCP via data { action: search, source_type: knowledge_bank }; on the Anthropic surface via knowledge_base.chat / knowledge_base.search).

  • HTTP: (not exposed as REST)
  • Required scopes: knowledge_base:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0
  • Tags: prompt, knowledge_base

Input

FieldTypeRequiredDescription
topicstringyesTopic to brief on.

prompts.knowledge_base.find_playbook

Find Playbook Prompt

Use when the user asks for a saved playbook, SOP, framework, or procedure on a topic. Directs the agent to search the knowledge base for playbook-style content and return ranked pointers back to the source documents (on MCP via data search with source_type=knowledge_bank; on the Anthropic surface via knowledge_base.search).

  • HTTP: (not exposed as REST)
  • Required scopes: knowledge_base:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0
  • Tags: prompt, knowledge_base, playbook

Input

FieldTypeRequiredDescription
topicstringyesPlaybook topic.

prompts.knowledge_base.prep_for_call

Prep For Call Prompt

Use when the user asks to prep for a call with a named account. Directs the agent to blend a KB search (prior notes, docs) with data.query (recent interactions, sentiment) and output a call-prep brief with open questions. KB search uses data.search (source_type=knowledge_bank) on MCP or knowledge_base.search on the Anthropic surface.

  • HTTP: (not exposed as REST)
  • Required scopes: knowledge_base:read, data:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0
  • Tags: prompt, knowledge_base, account

Input

FieldTypeRequiredDescription
account_namestringyesAccount or company name.

reference_document.list

List Reference Documents

List documents eligible as content-creation reference material. Use when populating the v2 Reference Documents picker or when the agent needs a shortlist before filling reference_document_ids on content_writer / researcher. Each row carries composite_id = 'knowledge_bank:<uuid>', suitable for passing straight through input_params. Accepts status, embedding_status, document_type, search, and pagination params.

  • HTTP: (not exposed as REST)
  • Required scopes: knowledge_base:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0

Input

FieldTypeRequiredDescription
statusstringno
embedding_statusstringno
document_typestringno
searchstringno
limitintegerno
offsetintegerno

voice_profile.get

Get Voice Profile

Fetch a single author's voice profile by UUID, including the cached voice analysis blob (vocabulary, personality, syntax) and sample counts. Use when the agent needs the full voice specification before drafting or when surfacing a voice detail view. Returns null when the profile does not exist or belongs to a different business.

  • HTTP: (not exposed as REST)
  • Required scopes: context:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0

Input

FieldTypeRequiredDescription
idstringyes

voice_profile.list

List Voice Profiles

List author voice profiles available to this business. Use when populating the content creation voice selector or when the agent needs to pick a cached voice by id before delegating to content_writer. Accepts optional voice_only=true to restrict to first-party authors (self / team) and hide external inspirational-only profiles.

  • HTTP: (not exposed as REST)
  • Required scopes: context:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0

Input

FieldTypeRequiredDescription
voice_onlystringno

writing_samples.archive

Toggle Writing Sample Archive Flag

Soft-archive or restore one writing sample by flipping platform_artifacts.status between archived and draft. Use when an operator wants to hide a sample from the active voice-learning pool without losing the row — unlike delete, this preserves all junctions and style analysis so unarchiving brings everything back. isArchived defaults to true; pass false to restore. Idempotent; cross-tenant ids are rejected with code=not_found.

  • HTTP: (not exposed as REST)
  • Required scopes: config:write
  • Required role: editor
  • Stability: stable
  • Version: 1.0
  • Tags: writing_samples, archive, soft-delete

Input

FieldTypeRequiredDescription
businessIdstringno
sampleIdstringyes
isArchivedbooleanno

writing_samples.create

Create Writing Sample Row

Ingest one new writing sample into the caller's workspace. Invoke when an operator pastes or uploads a piece of reference prose that should inform author voice learning or become an inspirational example. Content body is required and capped at the platform sample length; omitted titles are auto-generated by Claude with a graceful null fallback. Style analysis kicks off asynchronously after the row lands so the caller gets an immediate return while classification proceeds in the background.

  • HTTP: (not exposed as REST)
  • Required scopes: config:write
  • Required role: editor
  • Stability: stable
  • Version: 1.0
  • Tags: writing_samples, ingest

Input

FieldTypeRequiredDescription
businessIdstringno
titlestringno
contentstringyes
channelstringno
content_typestringno
source_urlstringno
languagestringno
raw_htmlstringno

writing_samples.delete

Delete Writing Sample Row

Permanently remove one writing sample owned by the caller's workspace. Call when an operator retires a sample that is no longer representative of an author's voice or when cleaning up misplaced uploads. Junction rows on author_profile_writing_samples cascade via foreign-key ON DELETE; the shadow writing_samples row is removed via the artifact reverse trigger. Destructive — the settings UI should confirm before invoking.

  • HTTP: (not exposed as REST)
  • Required scopes: config:write
  • Required role: admin
  • Stability: stable
  • Version: 1.0
  • Tags: writing_samples, delete, destructive

Input

FieldTypeRequiredDescription
businessIdstringno
sampleIdstringyes

writing_samples.get

Get Writing Sample Detail Row

Load one writing_samples row by UUID, scoped to the caller's workspace. Fetch when the settings page opens a sample detail drawer or a split-proposal preview and needs every column the admin controller used to ship (raw content body, channel, content_type, source_url, style_analysis blob, narrative_pattern, style_tags, style_analyzed_at). Returns null when the id is stale or belongs to another tenant — the REST adapter maps null to HTTP 404.

  • HTTP: (not exposed as REST)
  • Required scopes: config:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0

Input

FieldTypeRequiredDescription
idstringyes

writing_samples.list

List Writing Samples With Author Ids

Enumerate every writing_samples row for the caller's workspace, optionally filtered by author_id (via junction), content_type, channel, or archive status, and return them with a flattened author_ids array per row for the settings page's sample-table view. Read when rendering the Writing Samples tab or when a picker needs the canonical sorted list. Archived rows are hidden unless status='archived' or status='all'. Limit capped at 500; offset pagination is supported.

  • HTTP: (not exposed as REST)
  • Required scopes: config:read
  • Required role: viewer
  • Stability: stable
  • Version: 1.0

Input

FieldTypeRequiredDescription
author_idstringno
content_typestringno
channelstringno
status`enum("draft""archived""all")`
limitintegerno
offsetintegerno

writing_samples.propose_split

Propose Writing Sample Split Segments

Ask Claude to decompose a long prose document into coherent candidate writing samples so the operator can review and persist the useful ones individually. Invoke when a paste spans multiple posts/sections and manual splitting is tedious. Pure compute — nothing is persisted. Returns an array of { title?, content } segments plus a truncated flag when the input exceeded the 100k character LLM ceiling. Malformed model output maps to code=llm_invalid_json instead of throwing.

  • HTTP: (not exposed as REST)
  • Required scopes: config:write
  • Required role: editor
  • Stability: stable
  • Version: 1.0
  • Tags: writing_samples, llm, split, preview

Input

FieldTypeRequiredDescription
businessIdstringno
contentstringyes

writing_samples.update

Patch Writing Sample Fields

Apply a partial patch to one writing sample row (content body, title, channel, content_type, source_url, sort_order). Call when an editor corrects metadata from the settings page or reorders samples in the list view. Metadata fields merge atomically into content_json so sibling keys written by the style analyzer (style_analysis, style_summary, narrative_pattern) survive the update. Content mutations kick off a background style re-analysis; empty patches are rejected with code=no_fields.

  • HTTP: (not exposed as REST)
  • Required scopes: config:write
  • Required role: editor
  • Stability: stable
  • Version: 1.0
  • Tags: writing_samples, update

Input

FieldTypeRequiredDescription
businessIdstringno
sampleIdstringyes
title`stringnull`no
contentstringno
channel`stringnull`no
content_type`stringnull`no
source_url`stringnull`no
sort_orderintegerno