nixflex-mcp 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/B57-DELETES.md ADDED
@@ -0,0 +1,52 @@
1
+ # B57 content deletion — unpublished K9 candidates
2
+
3
+ Node/CLI 0.11.0, Python 0.4.0 and MCP 0.5.0. MCP has 97 tools. This change does not publish anything.
4
+
5
+ | Operation | Node | Python sync / async | CLI | MCP |
6
+ |---|---|---|---|---|
7
+ | Call | client.calls.delete(id) | client.calls.delete(id), await on AsyncNixflex | nixflex calls delete ID --confirm | delete_call with call_id and confirm:true |
8
+ | Voice campaign | client.campaigns.delete(id) | client.campaigns.delete(id), await on AsyncNixflex | nixflex campaigns delete ID --confirm | delete_campaign with campaign_id and confirm:true |
9
+ | SMS campaign | client.sms.campaigns.delete(id) | client.sms.campaigns.delete(id), await on AsyncNixflex | nixflex sms campaigns delete ID --confirm | delete_sms_campaign with campaign_id and confirm:true |
10
+
11
+ One DELETE per invocation. Never an automatic retry. SDK mutations require the application's deliberate authorization. The new voice CLI command and all three MCP content-delete tools preview locally with zero requests unless confirmed.
12
+
13
+ Calls end before their content is deleted. Success returns call_id, deleted:true, recording_deleted (boolean) and recording_cleanup (carrier_best_effort or queued). These fields do not prove every external recording copy is erased.
14
+
15
+ Campaign deletion cancels waiting work, ends running calls and hides the campaign. History and used charges remain; no refunds, and sent SMS cannot be recalled. Success returns campaign_id, deleted:true and message:"Campaign deleted". Owner/Admin only; missing/foreign resources return 404, including already absent resources. The kits never turn 404 into invented success. A previously hidden but still tracked owned item can return the same successful receipt on a deliberate repeat; hidden does not mean physically absent.
16
+
17
+ HTTP 503 with error.code hangup_pending and error.details {deleted:false,retry_pending:true} means the server queued deletion and finishes once hang-up is confirmed. Node/Python raise NixflexServerError with that exact status/code/details; CLI/MCP report a structured error, never success. A later deliberate repeat of the same DELETE is safe; the kit does not repeat it or poll automatically.
18
+
19
+ Other 5xx, lost replies or invalid JSON remain outcome_unknown: inspect the outcome before a deliberate retry. HTTP status and server details survive; the original server code is in details.original_code when uncertainty wrapping applies. Known 403/404 retain their exact code/details. No synthetic successful receipt is created. The three MCP tools require the matching ID and full documented success receipt; empty, incomplete or wrong-ID replies remain uncertain. Existing SDK methods continue passing valid JSON through; callers should require the documented deleted:true receipt rather than treating an arbitrary JSON object as proof.
20
+
21
+ Bulk calls.deleteAll() / calls.delete_all() / nixflex calls delete-all --confirm remains a separate guarded cleanup route with deleted/calls_deleted/recordings_deleted/sms_deleted counters. It is not account or SMS erasure and does not use B57's single-item queue classification. Bulk deletion stays outside MCP for safety.
22
+
23
+ Use fresh list/detail reads to inspect current server state. The kits do not cache deletion, hide rows locally or erase retained billing/history evidence. A deleted/retained stub and a 404 are returned as the API reports them.
24
+
25
+ ```js
26
+ // Using an already configured client; authorize the exact campaign first.
27
+ try {
28
+ const receipt = await client.campaigns.delete(campaignId);
29
+ if (receipt.deleted !== true) throw new Error('Deletion is not confirmed');
30
+ } catch (error) {
31
+ if (error.status === 503 && error.code === 'hangup_pending' &&
32
+ error.details.deleted === false && error.details.retry_pending === true) {
33
+ // Show "Deletion queued". Do not send another request automatically.
34
+ } else { throw error; }
35
+ }
36
+ ```
37
+
38
+ ```python
39
+ from nixflex.errors import NixflexServerError
40
+
41
+ # Use await client.campaigns.delete(campaign_id) with AsyncNixflex.
42
+ try:
43
+ receipt = client.campaigns.delete(campaign_id)
44
+ if receipt.get("deleted") is not True:
45
+ raise RuntimeError("Deletion is not confirmed")
46
+ except NixflexServerError as error:
47
+ if (error.status == 503 and error.code == "hangup_pending"
48
+ and error.details.get("deleted") is False and error.details.get("retry_pending") is True):
49
+ pass # Show "Deletion queued"; do not repeat automatically.
50
+ else:
51
+ raise
52
+ ```
@@ -0,0 +1,73 @@
1
+ # Call booking results and durable call requests (K7)
2
+
3
+ Source: B56 engine f6ff94d, 5 November 2026. Candidate versions remain Node/CLI 0.11.0, Python 0.4.0, MCP 0.5.0; unpublished.
4
+
5
+ ## Coverage
6
+
7
+ | Operation | Node | CLI | Python sync / async | MCP |
8
+ | --- | --- | --- | --- | --- |
9
+ | GET /v1/calls/{call_id}/bookings | calls.bookings(id) | calls bookings ID | calls.bookings(id) | get_call_bookings |
10
+ | POST /v1/calls/outbound, optional UUID request_id | calls.create(params) | calls create --request-id UUID or --body @prepared.json | calls.create(..., request_id=uuid) | create_call, optional request_id / safe_retry / confirm |
11
+ | GET /v1/calls/outbound/requests/{request_id} | calls.outboundRequest(uuid) | calls outboundRequest UUID | calls.outbound_request(uuid) | get_outbound_call_request |
12
+ | Local preparation, no API request | calls.prepare(params), prepareOutboundCall(params) | calls prepare --output prepared.json | calls.prepare(**params), prepare_outbound_call(params) | create_call with safe_retry:true and no request_id |
13
+
14
+ The two GET routes are new coverage. POST already existed; request_id extends it. Preparation is local, not another API endpoint. At K7, MCP registered 96 tools (94 prior plus two reads); only create_call gained optional inputs/guidance. Those historical contracts were pinned to K6. The current K9 count is 97; see B57-DELETES.md for its one added tool and two updated delete handlers/descriptions. Public-scope exclusions remain unchanged.
15
+
16
+ ## Retained booking result
17
+
18
+ All envelopes have exactly {call_id, state, result}. States are:
19
+
20
+ | State | Meaning | result |
21
+ | --- | --- | --- |
22
+ | ready | Retained, stamped booking changes from this call are available | CallBookingResult |
23
+ | none | Complete result proves no successful booking changes | null |
24
+ | processing | Call/post-call work is unfinished | null |
25
+ | deleted | Data was removed or expired | null |
26
+ | unavailable | Result cannot be established from retained evidence | null |
27
+
28
+ Never treat processing, deleted, unavailable, an error, or a missing call as none. An old empty history without completion proof is unavailable. These are this call's results, not current calendar inventory. They do not query the customer's calendar or prove the appointment still exists today.
29
+
30
+ The ready result has event:'call.bookings', call_id, agent_id, from, to, number, ended_at, timeline, final. agent_id/from/to/number/ended_at are nullable strings; ended_at is an ISO timestamp when known. The wire name is `from` in every language.
31
+
32
+ Each ordered timeline entry has action:created|rescheduled|cancelled, booking_uid, start, end, attendee_name, attendee_email, service, timezone, at. booking_uid and at are strings; the other fields are nullable. service may be string, number or null. Each final entry has booking_uid, status:active|cancelled and the same six appointment fields; no action/at. Preserve order, nulls, and server UID rotation. Do not refold events, invent appointments, or expose internal proof markers. Lookup/availability/duplicate-found operations are not new booking changes.
33
+
34
+ 404 not_found means missing, invalid or not owned; it is not an empty result. 503 call_bookings_unavailable means the read failed. SDKs provide NixflexCallBookingsUnavailableError. Authentication/permission errors remain errors. Reads are not cached by the server. Response projection drops unknown/private fields and rejects malformed public shapes instead of making up an outcome.
35
+
36
+ The new helpers reject missing, control-character, overlong and dot-only (`.` / `..`) call IDs before sending. Dot-only IDs would otherwise be normalized into a different URL by HTTP clients. Other special characters are encoded as one path component.
37
+
38
+ ## UUID preparation and one intentional send
39
+
40
+ Generate a UUID before the first POST, save it with the exact call inputs, and pass the saved body to create. `prepare` deep-copies JSON inputs; repeated preparation generates a different ID, so never prepare again to retry a prior intent. An explicitly supplied valid request_id is kept. A malformed UUID fails locally before any request. Python prepare accepts variables as an alias and stores canonical dynamic_vars; supply only one alias.
41
+
42
+ CLI --output writes UTF-8 without a BOM, publishes the whole file only after writing succeeds, and never overwrites a file. It sends no HTTP request, needs no API key and returns sent:false. Without --output use --json to obtain the prepared body. Keep that file private: it contains call inputs. Avoid PowerShell 5.1 `>` for JSON files (its default encoding is incompatible); use --output instead.
43
+
44
+ Every POST makes one attempt only. There is no automatic retry, ID replacement, redial, status-polling loop, cancellation or hidden reservation by the kit. A subsequent explicit POST with the same ID and identical inputs uses the server journal. Same-ID changed intent returns 409 request_id_conflict. The fingerprint includes agent_id, from_number, to_number, prompt, dynamic_vars, campaign_id, recipient_timezone, recipient_country and consent_confirmed. Keep all these identical. UUID scope is the API account in the selected environment. Keep using the same account and base URL; the same UUID on another account or environment is a separate request and can place another call. Do not assume a journal lifetime or promise perpetual idempotency.
45
+
46
+ Normal first acceptance is HTTP 201 with call_id, status:'initiated', request_id and the existing receipt fields. Accepted replay is HTTP 200 with {call_id, request_id, status:'initiated', replayed:true}; to/from are absent on replay. Acceptance means a call was accepted, not connected/completed or successfully booked.
47
+
48
+ If a call ID is known but the journal update was not confirmed, the successful response also has request_status:'unconfirmed', safe_to_retry:false. Keep the call ID; do not convert this response into a failed call or start another one. A lost, invalid or malformed acceptance is an unknown outcome with the saved UUID.
49
+
50
+ Calls without request_id retain the old request/response path. Public /v1 does not acquire the dashboard-only preview/consent requirements. No billing, carrier, role, ownership or admission rules are changed.
51
+
52
+ Node typing follows the actual response: a known no-ID input retains OutboundCallResponse; a required-ID input has OutboundRequestReceipt. A broadly annotated OutboundCallParams has an optional ID, so its return type is the union and to/from must be checked. Use `satisfies OutboundCallParams` to validate a no-ID literal without widening its type. This is a type-safety change, not a no-ID runtime change.
53
+
54
+ Cancelling an HTTP request does not cancel a remote call or prove it was never accepted. Node aborts on the UUID path report an unknown outcome with the saved ID. Python native async task cancellation remains CancelledError; keep the prepared ID outside the task and reconcile it separately. Never swallow cancellation into a retry loop.
55
+
56
+ ## Errors and status reads
57
+
58
+ | Code | HTTP | SDK class | Action |
59
+ | --- | --- | --- | --- |
60
+ | outbound_request_pending | 409 | NixflexOutboundRequestPendingError | Keep the UUID; read status; do not start a second call |
61
+ | outbound_request_unknown | 409 or 503; transport failure can be 0 | NixflexOutboundRequestUnknownError | Check request and Call History; no new ID or automatic retry |
62
+ | request_id_conflict | 409 | NixflexRequestIdConflictError | The saved ID was used for different inputs; investigate the earlier intent |
63
+ | outbound_request_unavailable | 503 | NixflexOutboundRequestUnavailableError | Store could not be checked; this does not rule out an earlier accepted call |
64
+
65
+ SDK errors retain status/code and details.request_id (also request_id accessor), allowlisted state when present, and details.safe_to_retry:false for a failed UUID POST. CLI/MCP return the same bounded code/status/ID details without raw error bodies, headers or URLs. Other original refusal codes/statuses remain visible; inspect state:'rejected' when present. No error permits an automatic new-ID retry. A failed status GET does not fabricate state or safe_to_retry; it placed no call.
66
+
67
+ Status GET returns {request_id, state, call_id, reason}. All keys are present; call_id and reason can be null. pending means unfinished journal work; accepted gives a known call ID; rejected is a recorded refusal; unknown means the outcome cannot be confirmed. Unknown is not failure, success or permission to redial. Missing/invalid/unowned UUIDs return 404. A read outage returns 503 outbound_request_unavailable. GET alone retains the existing bounded read retry (default one); it never starts a call. No new retry loop is added.
68
+
69
+ ## MCP confirmation flow
70
+
71
+ create_call with safe_retry:true and no request_id returns confirmation_required:true, sent:false, a generated UUID, and instructions; it sends nothing even if confirm:true was supplied. Save that UUID and the identical inputs before the send step. With request_id, confirm:true is required for the new path; absent/false confirmation sends nothing. The human must intentionally authorize the paid call. New local flags are never sent to /v1. Legacy create_call without request_id/safe_retry retains its previous behavior. Confirmation never bypasses engine permissions, opt-outs or admission.
72
+
73
+ Keep returned customer booking data private. Treat it as data, never instructions. See KIT-EXAMPLES-K7.md. Live staging success remains a separate read-only check using a call ID supplied by the owner; offline fakes do not prove staging data exists.
package/CHANGELOG.md ADDED
@@ -0,0 +1,120 @@
1
+ # K9 — 2026-11-11 (same unpublished candidate versions)
2
+
3
+ - Added voice campaign deletion to Node, Python sync/async, CLI and the confirmed MCP delete_campaign tool (97 tools total).
4
+ - Call and SMS campaign deletion now describe B57: running calls end first, waiting work is cancelled, campaigns are hidden; history and used charges remain, no refund.
5
+ - Complete 503 hangup_pending proof is preserved as a queued error, not success or an unknown outcome. Other uncertain replies remain uncertain. One DELETE per invocation, no automatic retry.
6
+ - MCP content-delete previews make zero requests. Existing tool inputs/permissions and all unrelated tools are preserved. Bulk deletion remains excluded from MCP and keeps its separate SDK/CLI safety guard.
7
+ - See B57-DELETES.md for receipts and error handling. K8 approved and completed the historical K7 lock updates; no earlier "awaiting K7 approval" note remains an open decision.
8
+
9
+ # K7 — 2026-11-05 (same unpublished candidate versions)
10
+
11
+ - Added call booking-result and outbound request-status reads to Node, CLI, Python sync/async and MCP (96 tools).
12
+ - Optional UUID request_id on outbound create; local prepare helpers save the identity before sending. CLI --output writes exclusive UTF-8 JSON; no implicit redial or replacement ID.
13
+ - First acceptance 201 and same-call replay 200 are distinct; unconfirmed journal acknowledgement preserves a known call ID. Four typed B56 errors retain safe UUID/status/code details.
14
+ - Booking ready/none/processing/deleted/unavailable stay distinct; private markers are removed. Exact timeline/final shapes and examples are in CALL-REQUESTS.md / KIT-EXAMPLES-K7.md.
15
+ - MCP create_call keeps the old no-ID path. New safe_retry prepares only; request_id requires confirm:true. The other 93 contracts and all unrelated handlers remain unchanged. Earlier exclusions remain.
16
+ - Local candidate only. Locked full-list/schema checks await K7 owner approval; no publication is authorized by this changelog.
17
+
18
+ # 0.5.0 — 2026-11-04 (unpublished candidate)
19
+
20
+ - Added four per-number Google Calendar methods and in-place carrier credential updates; matching CLI commands / five MCP tools (94 total).
21
+ - Credential CLI input is private environment/stdin only; MCP reads private environment after explicit confirmation. No secret arguments/output or automatic write retries.
22
+ - Added typed calendar/credential errors and nullable booking webhook models; service accepts string, number or null.
23
+ - Compatibility notice: SMS suppression is now HTTP 409 do_not_contact/conflict. Node/Python: catch NixflexDoNotContactError, while retaining old-server 400 invalid_request handling. MCP/CLI: inspect structured status/code. Never retry or remove opt-out automatically; not every 400 is suppression.
24
+ - All 89 previous MCP tools, schemas, handlers and safeguards preserved. Engine endpoints and previous kit exclusions unchanged except the expressly added K6 operations.
25
+
26
+ ## K5 approved follow-up — 2 November 2026
27
+
28
+ - Register 19 Knowledge tools (89 total); exclude legacy draft GET because it can normalize and save. Other exclusions stay unchanged.
29
+ - Narrow only the old activity reader cursor from 19 to 18 digits; existing handlers/permissions unchanged.
30
+ - No push or publication performed.
31
+
32
+ ## Unreleased K5 — 2 November 2026
33
+
34
+ - Whole-kit release checks; 69 old tools byte-identical, only the old activity cursor schema narrowed.
35
+ - 19 Knowledge tools registered and tested; legacy draft GET excluded because it can save.
36
+ - No existing handler/permission change. Old activity cursor accepts 18 digits instead of 19.
37
+
38
+ ## Unreleased K4 — 2 November 2026
39
+
40
+ - MCP now has 70 tools: 59 prior descriptors/permissions unchanged plus 11
41
+ approved additions. Only get_webhook and the unconfirmed delete_webhook preview
42
+ mask URL output; their errors, retries, confirmation and confirmed deletion stay
43
+ unchanged. New credential-setting/disconnect tools and signing secrets stay out.
44
+ - Organisation activity accepts UTC dates; event IDs/cursors are strings and
45
+ types now describe actor/sentence/displayed result. Added streamed CSV export
46
+ and organisation rename. CSV never retries after emitting data.
47
+ - Added all public integration settings to Node/CLI and Python sync/async.
48
+ PUT replaces config; function PATCH changes supplied fields only.
49
+ - CLI private integration output omits URLs, credentials, headers and free-form
50
+ schemas, including existing webhook reads/previews. SDK responses retain exact
51
+ wire data; callers must not log private configuration.
52
+ - New CLI writes require confirmation before any request. Existing mutation
53
+ retry/outcome safety stays unchanged. No signing-secret method; personal
54
+ session-only flows stay dashboard only.
55
+ - Candidate versions unchanged; nothing published. Successful real writes
56
+ require separate manual testing; offline tests are not staging evidence.
57
+
58
+ ## Unreleased K3 — 2 November 2026
59
+
60
+ - Added voice/SMS campaign controls, contact-hour preview and suppression lists,
61
+ web widget settings, and agent inbox reads/settings with exact public paths.
62
+ - Node/CLI and Python sync/async now cover all 27 C5 operations. Revisions and
63
+ read versions stay strings; nullable fields, JSON variables and cursors survive.
64
+ - Python inbox boolean queries use lowercase true/false. Reads never mark read.
65
+ - MCP now has 59 tools: 44 existing definitions/handlers unchanged plus 15 reviewed
66
+ additions. Every new mutation requires confirmation before any request.
67
+ - Intentional MCP exclusions: voice/SMS resume, voice/SMS consent and suppression
68
+ removal can enable outreach. All remain in API/SDK/CLI. Signup remains excluded
69
+ because it returns a new secret; bulk deletion remains excluded for AI safety.
70
+ - Creation can start work immediately; there is no safe draft-only campaign mode.
71
+ Writes never automatically repeat. Successful real writes need separate testing.
72
+ - Candidate versions unchanged; nothing published. Existing SDK/CLI methods and
73
+ engine endpoints remain available. SMS reuse_campaign_id is not supported.
74
+
75
+ # 0.4.0 — K1, 1 November 2026 (unpublished)
76
+
77
+ Removed set_number_monitor, get_byo_config, set_byo_config, delete_byo_config and get_call view=billing. Nine organisation tools now run in the main server (40 total); remove the old separate organisation launch configuration.
78
+ Reason: **non-public by Fahim decision**. Engine endpoints stay unchanged.
79
+
80
+ K1 corrects SMS campaign `message_template` and `scheduled_date`, root recipient
81
+ country/timezone, explicit policy values, single-contact location/context, SMS
82
+ cursors and envelopes, agent empty-create/defaults, and recording `expires_at`.
83
+ New agents use engine defaults: 300-second maximum, 10-second silence hang-up,
84
+ dynamic greeting ON. Omission uses engine defaults; explicit values are preserved.
85
+ With agent knowledge enabled, prompt admission is 3,000 tokens; the legacy OFF
86
+ path has its 16,000-character limit. This release adds no prompt-measurement methods.
87
+ Use the organisation webhook signing secret, independent of API-key rotation.
88
+
89
+ All kits expose errors as `{error:{type,code,message,details,doc_url,status,request_id}}`.
90
+ Node uses `toJSON()`, Python `to_dict()`, CLI/MCP use JSON. Missing metadata is null.
91
+ Timeout defaults to 30 seconds. GET retries once (Node/Python configurable, capped
92
+ at three); mutations never retry automatically, even DELETE or 429. A lost or
93
+ malformed mutation reply is outcome unknown: check before retrying. Explicit
94
+ not-sent proof stays visible. Do not wrap mutations in blind retry loops.
95
+ Launch acknowledges scheduling; recipient-local gates still apply. SMS deletion
96
+ refuses active work, returns the engine message and never promises cancellation.
97
+ Recording availability may be pending/unavailable; use expires_at, not a fixed
98
+ five-minute lifetime (private mode 600 seconds, compatibility mode 300).
99
+ Legacy SDK calls.list(agent_id=...) now refuses the ineffective filter; use history.
100
+ The CLI routes calls list --agent to history. MCP filtered lists already use history.
101
+ Dedicated billing, monitoring, BYO and personal-auth actions are non-public.
102
+ Number PATCH monitor_enabled remains an existing public setting; it is not a listener operation.
103
+ Engine endpoints are unchanged. This release is local and not published.
104
+
105
+ ## Historical releases
106
+
107
+
108
+ ## K2 core API additions — 1 November 2026
109
+
110
+ K2 core additions (same unpublished 0.4.0 candidate): one install now offers 44 tools. The original 40 definitions, schemas, permissions and confirmations are unchanged. Added get_account_retention, get_key_activity, list_voices and get_voice. Bulk deletion is not offered to AI assistants for safety. No non-public operation was added.
111
+
112
+ ### 2 November 2026 — MCP signup removed by Fahim decision
113
+
114
+ Removed the unpublished K2 create_api_account tool and its transport from the
115
+ server, npm package and Desktop bundles: account signup is not offered to AI
116
+ assistants because it returns a new secret. Confirmation did not keep that secret
117
+ out of the conversation. Existing API/Node/Python/CLI signup is unchanged; use it
118
+ outside the AI conversation and save the result privately. Direct calls to the
119
+ removed tool fail without making an HTTP request, even with confirm:true.
120
+ All 44 retained tool descriptors, permissions and safeguards remain unchanged.
@@ -0,0 +1,118 @@
1
+ # K6 examples — Node 0.11.0 / Python 0.4.0 / MCP 0.5.0
2
+
3
+ Examples are not an instruction to perform a live write. Use your owned number and explicit environment; no keys or carrier secrets belong in source, terminal arguments or chat. API authentication is NIXFLEX_API_KEY. The read-only smoke is separate.
4
+
5
+ ## Node / TypeScript
6
+
7
+ ```ts
8
+ import Nixflex, {NixflexDoNotContactError, NixflexInvalidRequestError,
9
+ type Booking, type CallCompletedBookingEvent, type SmsBookingEvent} from 'nixflex';
10
+ const client = new Nixflex({apiKey:process.env.NIXFLEX_API_KEY!, baseUrl:process.env.NIXFLEX_BASE_URL!});
11
+ const number = '+12025550123'; // fictional example; replace with your owned number
12
+ const consent = await client.integrations.connectGoogleCalendar(number, 'https://app.example.test/calendar-return');
13
+ // Present consent.url privately to the human; never auto-open or log it.
14
+ const status = await client.integrations.getGoogleCalendar(number);
15
+ if (status.needs_reconnect) { /* Request fresh human consent, not a silent reconnect. */ }
16
+ const settings = await client.integrations.updateGoogleCalendarSettings(number, {
17
+ timezone:'America/New_York', slot_minutes:30, calendar_id:'primary', send_invites:false,
18
+ hours:{monday:['09:00','17:00'],tuesday:['09:00','17:00'],wednesday:['09:00','17:00'],
19
+ thursday:['09:00','17:00'],friday:['09:00','17:00'],saturday:null,sunday:null}
20
+ });
21
+ // Only on a separate, deliberate disconnect request:
22
+ await client.integrations.disconnectGoogleCalendar(number);
23
+ // Sensitive routing change. Read values from a privately configured process, never log.
24
+ const receipt = await client.phoneNumbers.updateCredentials(number, {
25
+ twilio_sid:process.env.NIXFLEX_TWILIO_SID!,twilio_token:process.env.NIXFLEX_TWILIO_TOKEN!
26
+ });
27
+ try {
28
+ await client.sms.send({agent_id:'your-agent-id',from_number:number,to:'+12025550124',message:'Requested information'});
29
+ } catch (error) {
30
+ if (error instanceof NixflexDoNotContactError) { /* Stop; do not resend or remove suppression. */ }
31
+ else if (error instanceof NixflexInvalidRequestError) { /* Retain old 400 validation/suppression handling. */ }
32
+ else throw error;
33
+ }
34
+ function bookingPart(event: CallCompletedBookingEvent | SmsBookingEvent): Booking[] {
35
+ // Call only AFTER the existing verifier has checked the original raw webhook body.
36
+ return event.event === 'call.completed' ? event.bookings : [event.booking];
37
+ }
38
+ ```
39
+
40
+ Telnyx uses the same updateCredentials method with only `{telnyx_api_key:process.env.NIXFLEX_TELNYX_API_KEY!,telnyx_connection_id:process.env.NIXFLEX_TELNYX_CONNECTION_ID!}`. Never mix pairs or send provider in the body. Type assertions are not runtime secret validation; the method rejects missing/invalid pairs without HTTP.
41
+
42
+ ## Python sync and async
43
+
44
+ ```python
45
+ import os
46
+ from nixflex import (Nixflex, AsyncNixflex, NixflexDoNotContactError,
47
+ NixflexInvalidRequestError, Booking, CallCompletedBookingEvent, SmsBookingEvent)
48
+ number = '+12025550123'
49
+ config = dict(api_key=os.environ['NIXFLEX_API_KEY'],base_url=os.environ['NIXFLEX_BASE_URL'])
50
+ with Nixflex(**config) as client:
51
+ consent = client.integrations.connect_google_calendar(number, 'https://app.example.test/calendar-return')
52
+ # Present the short-lived link privately to a human; never print it to logs.
53
+ status = client.integrations.get_google_calendar(number)
54
+ settings = client.integrations.update_google_calendar_settings(number, send_invites=False)
55
+ # Separate deliberate disconnect:
56
+ client.integrations.disconnect_google_calendar(number)
57
+ receipt = client.phone_numbers.update_credentials(number,
58
+ telnyx_api_key=os.environ['NIXFLEX_TELNYX_API_KEY'],
59
+ telnyx_connection_id=os.environ['NIXFLEX_TELNYX_CONNECTION_ID'])
60
+ try:
61
+ client.sms.send(agent_id='your-agent-id',from_number=number,to='+12025550124',message='Requested information')
62
+ except NixflexDoNotContactError:
63
+ pass # Stop; nothing sent. Do not retry or bypass opt-out.
64
+ except NixflexInvalidRequestError:
65
+ pass # Existing old-server 400 handling; not all validation failures mean opt-out.
66
+
67
+ async def read_status():
68
+ async with AsyncNixflex(**config) as client:
69
+ return await client.integrations.get_google_calendar(number)
70
+ # Every other method has the same arguments and is awaited in AsyncNixflex.
71
+
72
+ def booking_part(event):
73
+ # Only after raw-body signature verification. TypedDict is not authentication.
74
+ return event['bookings'] if event['event'] == 'call.completed' else [event['booking']]
75
+ ```
76
+
77
+ ## CLI (PowerShell-safe argument shapes)
78
+
79
+ Privately configure NIXFLEX_API_KEY, NIXFLEX_BASE_URL and the selected carrier pair. These command lines contain no secret values. These are independent actions, not one recommended sequence.
80
+
81
+ ```powershell
82
+ nixflex integrations connectGoogleCalendar '+12025550123' --return-url 'https://app.example.test/calendar-return' --confirm
83
+ nixflex integrations getGoogleCalendar '+12025550123' --json
84
+ nixflex integrations updateGoogleCalendarSettings '+12025550123' --body '@calendar-settings.json' --confirm
85
+ nixflex integrations disconnectGoogleCalendar '+12025550123' --confirm
86
+ nixflex numbers updateCredentials '+12025550123' --provider twilio --confirm --json
87
+ # Alternative: a trusted local secret-manager process pipes the exact JSON pair to stdin:
88
+ # <private secret-manager command> | nixflex numbers updateCredentials '+12025550123' --provider telnyx --credentials-stdin --confirm
89
+ ```
90
+
91
+ calendar-settings.json contains settings only, e.g. `{"send_invites":false}`; never carrier credentials. Omit --confirm to preview without a request. Credential commands reject --body, --key and secret flags before the argument parser can echo values. SMS --json errors expose status/type/code: stop on 409 do_not_contact; retain old 400 handling. Webhook types do not add a CLI listener or ingest endpoint.
92
+
93
+ ## MCP — K6's five additions (current total: 96 with K7)
94
+
95
+ Ask the human to approve the exact number/change before using confirm:true. Credentials are preconfigured privately in the SERVER process environment, never tool arguments or chat. Missing configuration sends nothing. Existing 89 tools retain their original safeguards.
96
+
97
+ | Tool | Arguments example | Result |
98
+ | --- | --- | --- |
99
+ | connect_google_calendar | `{ "phone_number":"+12025550123", "return_url":"https://app.example.test/calendar-return", "confirm":true }` | Consent url + expires_at; human opens it |
100
+ | get_google_calendar | `{ "phone_number":"+12025550123" }` | Six status fields including needs_reconnect and send_invites |
101
+ | update_google_calendar_settings | `{ "phone_number":"+12025550123", "send_invites":false, "confirm":true }` | Safe settings, false preserved |
102
+ | disconnect_google_calendar | `{ "phone_number":"+12025550123", "confirm":true }` | ok:true, connected:false; no claim of remote revoke |
103
+ | update_phone_number_credentials | `{ "phone_number":"+12025550123", "provider":"twilio", "confirm":true }` | Number, provider, updated:true only |
104
+
105
+ All new writes without confirmation return confirmation_required:true, sent:false. Google settings accepts the same fields as Node/Python, including the seven-day hours object above. Use provider telnyx for the alternate private environment pair. No bulk deletion, signup, suppression removal, campaign resume/consent or hidden-write Knowledge draft tool is added.
106
+
107
+ MCP SMS errors use `error.status=409`, `error.type=conflict`, `error.code=do_not_contact`; report that nothing was sent and stop. Older 400 invalid_request remains generic. The shipped booking schema can validate the booking part of an authenticated webhook locally:
108
+
109
+ ```js
110
+ import {callCompletedBookingSchema, smsBookingSchema} from 'nixflex-mcp/k6-schemas.js';
111
+ // verifiedEvent is supplied only after existing raw-body signature verification.
112
+ function parseBookingEvent(verifiedEvent) {
113
+ return verifiedEvent.event === 'call.completed'
114
+ ? callCompletedBookingSchema.parse(verifiedEvent) : smsBookingSchema.parse(verifiedEvent);
115
+ }
116
+ ```
117
+
118
+ No MCP webhook-receiver tool is registered. Booking required keys: action, booking_uid, start, end, attendee_name, attendee_email, service, timezone. Preserve null; service can be numeric. Never count internal already_exists lookups as mutations.
@@ -0,0 +1,104 @@
1
+ # K7 examples (unpublished candidates)
2
+
3
+ Set credentials privately outside code. Every example explicitly supplies a base URL; do not copy a production URL into a test. Preparation is local. Save the account and base-URL association with the intent; reuse that same environment and account when reconciling or retrying. Running create places a paid call: execute that line only for a human-approved call, never as an automatic retry.
4
+
5
+ ## Node
6
+
7
+ ```js
8
+ import Nixflex, {prepareOutboundCall, NixflexOutboundRequestError} from 'nixflex';
9
+ import {writeFileSync, readFileSync} from 'node:fs';
10
+ const client = new Nixflex({apiKey:process.env.NIXFLEX_API_KEY,
11
+ baseUrl:process.env.NIXFLEX_BASE_URL, maxRetries:0});
12
+ // Step 1, once per NEW intent. Application must keep this private file/account binding.
13
+ const prepared = prepareOutboundCall({agent_id:'YOUR_AGENT',
14
+ to_number:'+12025550100', from_number:'+12025550101', prompt:'Your approved call purpose'});
15
+ writeFileSync('prepared-call.json', JSON.stringify(prepared), {encoding:'utf8', flag:'wx', mode:0o600});
16
+ // Step 2, only after human authorization; never wrap this in an automatic retry loop.
17
+ const saved = JSON.parse(readFileSync('prepared-call.json','utf8'));
18
+ try {
19
+ const receipt = await client.calls.create(saved);
20
+ // Persist receipt.call_id, including if request_status is unconfirmed. Do not redial.
21
+ } catch (error) {
22
+ if (!(error instanceof NixflexOutboundRequestError)) throw error;
23
+ // Display only error.status/error.code/error.details.request_id, then reconcile.
24
+ }
25
+ // Read separately, without creating any call:
26
+ const request = await client.calls.outboundRequest(saved.request_id);
27
+ if (request.state === 'accepted' && request.call_id) {
28
+ const bookings = await client.calls.bookings(request.call_id);
29
+ if (bookings.state === 'ready') { /* Use timeline/final as returned. */ }
30
+ else if (bookings.state === 'none') { /* Proven no successful booking changes. */ }
31
+ else { /* Keep processing/deleted/unavailable distinct. */ }
32
+ }
33
+ ```
34
+
35
+ For a retry decision, load the existing file; do not execute Step 1 again. SDK typed request_id callers receive OutboundRequestReceipt (to/from optional); a no-ID create retains OutboundCallResponse typing.
36
+
37
+ ## CLI (PowerShell 5.1 and 7)
38
+
39
+ ```powershell
40
+ # Put agent_id/to_number/from_number/prompt in a private UTF-8 intent.json.
41
+ # Local only; fails if prepared-call.json already exists. No key required.
42
+ nixflex calls prepare --body '@intent.json' --output prepared-call.json --json
43
+ # Only for the approved initial send. Key/base URL are configured privately.
44
+ nixflex calls create --body '@prepared-call.json' --base-url $env:NIXFLEX_BASE_URL --json
45
+ # Read only. These commands cannot place calls.
46
+ nixflex calls outboundRequest 'SAVED-UUID' --base-url $env:NIXFLEX_BASE_URL --json
47
+ nixflex calls bookings 'KNOWN-CALL-ID' --base-url $env:NIXFLEX_BASE_URL --json
48
+ ```
49
+
50
+ Check each command's exit code before continuing; never chain prepare/create in a retry loop. A supplied --request-id UUID is also supported for create, but save the exact inputs first. CLI --json errors exit 1; inspect error.status/code/details.request_id. Never print the key or log the booking payload.
51
+
52
+ ## Python sync and async
53
+
54
+ ```python
55
+ import json, os
56
+ from pathlib import Path
57
+ from nixflex import Nixflex, AsyncNixflex, prepare_outbound_call, NixflexOutboundRequestError
58
+ connection = dict(api_key=os.environ['NIXFLEX_API_KEY'],
59
+ base_url=os.environ['NIXFLEX_BASE_URL'], max_retries=0)
60
+ # Local preparation, once for a new authorized intent; use private access permissions.
61
+ prepared = prepare_outbound_call(dict(agent_id='YOUR_AGENT', to_number='+12025550100',
62
+ from_number='+12025550101', prompt='Your approved call purpose', variables={'name':'Example'}))
63
+ with open('prepared-call.json','x',encoding='utf-8') as file:
64
+ json.dump(prepared,file)
65
+ saved = json.loads(Path('prepared-call.json').read_text(encoding='utf-8'))
66
+ with Nixflex(**connection) as client:
67
+ try:
68
+ receipt = client.calls.create(**saved) # Paid call, human authorization required.
69
+ except NixflexOutboundRequestError as error:
70
+ # Keep saved ID; surface only safe code/status, reconcile instead of redialling.
71
+ pass
72
+ state = client.calls.outbound_request(saved['request_id'])
73
+ if state['state'] == 'accepted' and state['call_id']:
74
+ result = client.calls.bookings(state['call_id'])
75
+
76
+ async def inspect_saved_call(request_id):
77
+ async with AsyncNixflex(**connection) as client:
78
+ state = await client.calls.outbound_request(request_id)
79
+ if state['state'] == 'accepted' and state['call_id']:
80
+ return await client.calls.bookings(state['call_id'])
81
+ return state
82
+ # For async sending, explicitly await client.calls.create(**saved), ONCE.
83
+ # client.calls.prepare(**params) remains a local synchronous helper even on AsyncNixflex.
84
+ ```
85
+
86
+ Never regenerate the ID when reopening the process. Stop when state is unknown/pending; rejected is a refusal, not permission to blindly redial. Booking state remains independent from request acceptance.
87
+
88
+ ## MCP
89
+
90
+ These are tools/call arguments, not prompts to paste a secret into an assistant:
91
+
92
+ ```json
93
+ {"name":"create_call","arguments":{"agent_id":"YOUR_AGENT","to_number":"+12025550100","from_number":"+12025550101","prompt":"Your approved purpose","safe_retry":true}}
94
+ ```
95
+
96
+ This returns a UUID and sends nothing. Retain it with the exact inputs. After explicit human authorization, use that returned UUID (do not use a newly generated ID):
97
+
98
+ ```json
99
+ {"name":"create_call","arguments":{"agent_id":"YOUR_AGENT","to_number":"+12025550100","from_number":"+12025550101","prompt":"Your approved purpose","request_id":"RETURNED-UUID","confirm":true}}
100
+ {"name":"get_outbound_call_request","arguments":{"request_id":"RETURNED-UUID"}}
101
+ {"name":"get_call_bookings","arguments":{"call_id":"KNOWN-CALL-ID"}}
102
+ ```
103
+
104
+ RETURNED-UUID/KNOWN-CALL-ID are placeholders, not valid values to execute. Unknown/pending means investigate, never allocate a replacement ID. A read-only staging smoke never invokes create_call. Two new tools bring MCP to 96; the 19 approved Knowledge tools and all earlier exclusions stay in this same install.
package/LICENSE CHANGED
@@ -1,9 +1,9 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Nixflex Enterprises LLC
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
-
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nixflex Enterprises LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/METHODS.md ADDED
@@ -0,0 +1,129 @@
1
+ # Registered MCP tools — approved K5
2
+
3
+ Exactly 96 registered tools: 94 K6 tools plus two K7 reads; create_call adds optional UUID preparation/confirmation inputs. Legacy draft GET is excluded (hidden write). The runtime tools/list is authoritative.
4
+ Existing schemas/annotations/confirmations are byte-pinned to K4 except the approved old activity cursor 19 to 18 digits; handlers unchanged. No blanket guarantee that an old write is harmless; inspect its schema and use only explicitly requested actions.
5
+
6
+ | Tool | Read-only hint | Input fields |
7
+ | --- | --- | --- |
8
+ | get_usage | true | |
9
+ | rotate_api_key | false | confirm |
10
+ | list_agents | true | limit, offset, status, search |
11
+ | get_agent | true | agent_id |
12
+ | create_agent | false | name, system_prompt, fields |
13
+ | update_agent | false | agent_id, fields |
14
+ | delete_agent | false | agent_id, confirm |
15
+ | create_call | false | agent_id, to_number, prompt, from_number, variables, recipient_country, recipient_timezone |
16
+ | list_calls | true | history, limit, offset, cursor, agent_id, agent, number, search, direction, outcome, source, period, since, until |
17
+ | get_call | true | call_id, view |
18
+ | delete_call | false | call_id, confirm |
19
+ | create_campaign | false | agent_id, from_number, name, recipients, consent_confirmed, duplicate_policy, allow_wider_hours, hours_confirmation, schedule_type, scheduled_date, window_start_minutes, window_end_minutes, window_days, timezone, skip_invalid, reply_window_hours, reply_context_prompt, fields, prompt |
20
+ | launch_campaign | false | campaign_id |
21
+ | list_phone_numbers | true | phone_number, usage, period, time_zone, agent_id, provider, limit, cursor |
22
+ | import_phone_number | false | phone_number, agent_id, fields |
23
+ | update_phone_number | false | phone_number, fields |
24
+ | delete_phone_number | false | phone_number, confirm |
25
+ | set_number_web_calls | false | phone_number, enabled |
26
+ | get_caller_context | true | phone_number, caller_number |
27
+ | set_caller_context | false | phone_number, caller_number, name, email, phone, location, reference_id, preference |
28
+ | import_caller_context | false | phone_number, callers |
29
+ | delete_caller_context | false | phone_number, caller_number, confirm |
30
+ | send_sms | false | agent_id, from_number, to, message, context, recipient_country, recipient_timezone |
31
+ | create_sms_campaign | false | agent_id, from_number, name, recipients, consent_confirmed, duplicate_policy, allow_wider_hours, hours_confirmation, schedule_type, scheduled_date, window_start_minutes, window_end_minutes, window_days, timezone, skip_invalid, reply_window_hours, reply_context_prompt, fields, message, message_template |
32
+ | launch_sms_campaign | false | campaign_id |
33
+ | list_sms_campaigns | true | status, limit, before |
34
+ | get_sms_campaign | true | campaign_id, limit, recipient_cursor, message_cursor |
35
+ | delete_sms_campaign | false | campaign_id, confirm |
36
+ | set_webhook | false | phone_number, url, slot |
37
+ | get_webhook | true | phone_number, slot |
38
+ | delete_webhook | false | phone_number, slot, confirm |
39
+ | get_organisation | true | |
40
+ | list_organisation_members | true | |
41
+ | list_organisation_activity | true | before, actor |
42
+ | invite_organisation_member | false | email, role, confirm |
43
+ | resend_organisation_invite | false | invite_id, confirm |
44
+ | revoke_organisation_invite | false | invite_id, confirm |
45
+ | remove_organisation_member | false | user_id, confirm |
46
+ | update_organisation_member_role | false | user_id, role, confirm |
47
+ | claim_organisation_owner | false | email, confirm |
48
+ | get_account_retention | true | |
49
+ | get_key_activity | true | period |
50
+ | list_voices | true | agent_id, agent_language, language, gender, locale, availability, limit, cursor |
51
+ | get_voice | true | voice_key, agent_id, agent_language |
52
+ | list_campaigns | true | status, limit |
53
+ | cancel_campaign | false | id, confirm |
54
+ | update_sms_campaign | false | id, body, confirm |
55
+ | cancel_sms_campaign | false | id, confirm |
56
+ | preview_contact_hours | true | agent_id, recipients, campaign |
57
+ | list_contact_suppressions | true | channel, after |
58
+ | add_contact_suppressions | false | phone_numbers, channel, confirm |
59
+ | get_web_agent | true | number |
60
+ | update_web_agent | false | number, body, confirm |
61
+ | list_inbox_conversations | true | channel, number, archived, unread, search, since, period, limit, offset |
62
+ | get_inbox_thread | true | channel, number, thread, limit, before, before_id |
63
+ | update_inbox_thread | false | channel, number, thread, body, confirm |
64
+ | get_inbox_features | true | |
65
+ | list_inbox_numbers | true | offset |
66
+ | get_inbox_retention | true | number |
67
+ | get_calcom | true | phone_number |
68
+ | get_slack | true | phone_number |
69
+ | get_zapier | true | phone_number |
70
+ | get_make | true | phone_number |
71
+ | get_gohighlevel | true | phone_number |
72
+ | get_number_web_calls | true | phone_number |
73
+ | get_number_precall | true | phone_number |
74
+ | get_agent_precall | true | agent_id |
75
+ | list_custom_functions | true | phone_number |
76
+ | list_organisation_activity_filtered | true | before, actor, from, to |
77
+ | rename_organisation | false | name, confirm |
78
+ | get_agent_knowledge | true | target |
79
+ | get_agent_knowledge_keyterms | true | target |
80
+ | measure_knowledge_source | true | target, text |
81
+ | start_knowledge_test | false | target, mode, channel, draft_id, idempotency_key, confirm |
82
+ | get_knowledge_base | true | kb |
83
+ | get_knowledge_overview | true | kb |
84
+ | list_knowledge_sources | true | kb, limit, cursor |
85
+ | search_knowledge_topics | true | kb, query |
86
+ | list_knowledge_topics | true | kb, limit, cursor |
87
+ | get_knowledge_topic | true | kb, id |
88
+ | list_knowledge_unanswered | true | kb, limit, cursor |
89
+ | get_knowledge_capabilities | true | |
90
+ | list_knowledge_events | true | cursor |
91
+ | get_knowledge_job | true | id |
92
+ | list_knowledge_targets | true | limit, cursor, q, target |
93
+ | get_knowledge_test | true | id |
94
+ | cancel_knowledge_test | false | id, idempotency_key, confirm |
95
+ | ask_knowledge_test | false | id, text, idempotency_key, confirm |
96
+ | get_knowledge_usage | true | kb |
97
+
98
+ ## K6 per-number additions
99
+
100
+ | HTTP operation (number is URL-encoded E.164) | Node / CLI command | Python sync + async | MCP |
101
+ | --- | --- | --- | --- |
102
+ | POST /v1/integrations/google-calendar/number/{number}/connect | integrations.connectGoogleCalendar / integrations connectGoogleCalendar | integrations.connect_google_calendar | connect_google_calendar |
103
+ | GET /v1/integrations/google-calendar/number/{number} | integrations.getGoogleCalendar / integrations getGoogleCalendar | integrations.get_google_calendar | get_google_calendar |
104
+ | DELETE /v1/integrations/google-calendar/number/{number} | integrations.disconnectGoogleCalendar / integrations disconnectGoogleCalendar | integrations.disconnect_google_calendar | disconnect_google_calendar |
105
+ | PATCH /v1/integrations/google-calendar/number/{number} | integrations.updateGoogleCalendarSettings / integrations updateGoogleCalendarSettings | integrations.update_google_calendar_settings | update_google_calendar_settings |
106
+ | POST /v1/phone-numbers/{number}/credentials | phoneNumbers.updateCredentials / numbers updateCredentials | phone_numbers.update_credentials | update_phone_number_credentials |
107
+
108
+ See NUMBER-FEATURES.md for exact input/output and errors.
109
+
110
+ ## K7 call results and requests
111
+
112
+ | Operation | Node | CLI | Python sync / async | MCP |
113
+ | --- | --- | --- | --- | --- |
114
+ | GET /v1/calls/{call_id}/bookings | calls.bookings(id) | calls bookings ID | calls.bookings(id) | get_call_bookings |
115
+ | POST /v1/calls/outbound, optional UUID request_id | calls.create(params) | calls create --request-id UUID or --body @prepared.json | calls.create(..., request_id=uuid) | create_call, optional request_id / safe_retry / confirm |
116
+ | GET /v1/calls/outbound/requests/{request_id} | calls.outboundRequest(uuid) | calls outboundRequest UUID | calls.outbound_request(uuid) | get_outbound_call_request |
117
+ | Local preparation, no API request | calls.prepare(params), prepareOutboundCall(params) | calls prepare --output prepared.json | calls.prepare(**params), prepare_outbound_call(params) | create_call with safe_retry:true and no request_id |
118
+
119
+ The two GET routes are new coverage. POST already existed; request_id extends it. Preparation is local, not another API endpoint. At K7, MCP registered 96 tools (94 prior plus two reads); only create_call gained optional inputs/guidance. Those historical contracts were pinned to K6. K9 now registers 97 tools; only its two B57 delete handlers/descriptions change alongside the new voice-delete tool. Public-scope exclusions remain unchanged.
120
+
121
+ See CALL-REQUESTS.md for exact fields, typed errors, unchanged no-ID behavior and CLI/MCP confirmation rules.
122
+
123
+ ## K9 B57 deletion
124
+
125
+ | Tool | Read only | Arguments |
126
+ |---|---|---|
127
+ | delete_campaign | false | campaign_id, confirm |
128
+
129
+ See [B57-DELETES.md](B57-DELETES.md) for the three receipts, queued 503, permissions, uncertainty and unchanged bulk guard.