@talqing/mcp 0.3.1 → 0.3.2

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.
Files changed (3) hide show
  1. package/SKILL.md +110 -33
  2. package/package.json +1 -1
  3. package/tools.json +85 -1
package/SKILL.md CHANGED
@@ -161,6 +161,35 @@ An agent is a single object, `config`, plus what you attach to it:
161
161
  not this list. As with `tools`, an entry may instead carry `{"mcp": {name,
162
162
  url, headers, allowed_tools, tools_namespace}}`, which is created as a
163
163
  `custom_mcp` integration and replaced by its id.
164
+ - **`tasks`** — jobs this agent can enter and come back from, each
165
+ `{"name": "collect_shipping_address", "task_id": "...", "description": "...",
166
+ "message": "..."}`. Each becomes one ordinary tool the model can call: the
167
+ task takes over the conversation, speaks with THIS agent's voice and ears,
168
+ and hands its typed `output` back as the tool's result. Use one for a bounded
169
+ job inside a longer call — taking an address, qualifying a lead — and a
170
+ `handoffs` entry when the caller should belong to someone else from then on.
171
+
172
+ `name` is yours, not the task's, so renaming the task never changes the tool
173
+ name a published prompt was written against. The task must be **published**;
174
+ publishing the agent pins the version. An entry may instead carry `{"task":
175
+ {...whole TaskConfig...}}`, which on the agent endpoints is created and
176
+ published as a real task, exactly as an inline tool is.
177
+
178
+ **The task's `vars` are this tool's schema, minus every variable the call can
179
+ answer for itself** — every name the CALLING AGENT declares, plus every name
180
+ the session was started with. Those are filled in automatically and never
181
+ shown to the model, a declared-but-blank one included. So a task declaring
182
+ `customer_id` on an agent declaring `customer_id` shows the model nothing to
183
+ invent. Anything left over becomes a model argument, which is why a task
184
+ should declare only what the caller or the model must supply: a value already
185
+ in `{{userdata.*}}` belongs in the task's prompt, not in its `vars`.
186
+ Publishing warns on the bad shape.
187
+
188
+ A task inherits the call's whole media stack, so one task fits every agent and
189
+ every channel. It cannot contain a `handoff` (publish refuses it), the calling
190
+ agent's own tools are NOT available while it holds the floor, and
191
+ `timeout_seconds` on the task is the only bound on how long it may hold the
192
+ caller.
164
193
  - **`handoffs`** — where this agent may pass the conversation next, each
165
194
  `{"name": "Billing", "agent_id": "...", "description": "...", "context":
166
195
  "transcript" | "summary" | "none", "recent_turns": 2, "summary_prompt": "...",
@@ -520,8 +549,13 @@ A tool is one capability the agent's LLM can call mid-conversation. It has:
520
549
  to get it out of the conversation, and a bare `{"type": "string"}` is how a
521
550
  tool ends up called with the wrong value. Mark the ones the tool cannot run
522
551
  without as `required`, and use an `enum` wherever the set of values is closed.
523
- - **`long_running_task`** — voice and video agents keep talking while it runs;
524
- text agents wait for the result either way.
552
+ - **`long_running_task`** — voice and video agents keep talking while it runs and
553
+ share the result when it lands; a run finishing within a second answers inline
554
+ instead. Text agents wait either way. There is no fixed line — steer it from
555
+ the description, phrased conditionally ("if it is still running, say you are on
556
+ it; if the result is already there, give it"), because an unconditional "say
557
+ you have started it" makes the agent announce work it has already finished.
558
+ Cannot be `silent`, or contain a `transfer` or `handoff`.
525
559
  - **`silent`** — no immediate reply after it runs. You rarely need to set it: a
526
560
  tool in which no operation can return a response (see below) is silent
527
561
  automatically, and so is any run that reaches `end_call`.
@@ -550,7 +584,8 @@ LLM — use it for noisy intermediate steps.
550
584
 
551
585
  **Silence is derived, not defaulted.** If no operation in the tree can return a
552
586
  response, the tool is silent whatever `silent` says — including operations inside
553
- `if` branches. So a tool that is just `say "Your appointment is confirmed"` says
587
+ `if` branches, and including any `background_execution` one, which has no
588
+ response to hide. So a tool that is just `say "Your appointment is confirmed"` says
554
589
  that once, rather than saying it and then improvising a second sentence on top.
555
590
  If the agent should add a closing line, add a `generate_reply` operation that
556
591
  states what to add; do not try to turn the derived silence off.
@@ -796,17 +831,23 @@ Each hook points at a **published tool id**, or null.
796
831
 
797
832
  ## Agent tasks
798
833
 
799
- An **agent task** is an agent nobody talks to. Same prompt, same model, same
800
- tools, same MCP servers minus every conversational organ (speech, greeting,
801
- turn-taking, handoffs, knowledge bases), plus the one thing a conversation
802
- cannot have: a **typed structured output**. It takes named inputs, does some
803
- work, and returns a value. `POST /v1/tasks/{task_id}/runs` runs one and waits.
834
+ An **agent task** takes named inputs, does some work, and returns a **typed
835
+ structured output**. Same prompt, same model, same tools, same MCP servers, same
836
+ knowledge and same lifecycle hooks as an agent minus everything that belongs
837
+ to a *session*, because a task never owns one.
838
+
839
+ **It runs two ways, and declares nothing that ties it to either.** On its own —
840
+ `POST /v1/tasks/{task_id}/runs`, or an email batch drafting a row — it is an LLM
841
+ with tools and nobody to talk to. Attached to an agent through
842
+ `AgentConfig.tasks`, it takes over that conversation for as long as the job
843
+ takes, on the call's own voice and ears, and hands its result back as a tool
844
+ result.
804
845
 
805
846
  It is its own noun with its own operations (`list_tasks`, `create_task`,
806
847
  `get_task`, `update_task`, `delete_task`, `run_task`, `list_task_runs`) — not a
807
848
  fourth agent channel. Use one wherever the work has an input and an answer
808
849
  rather than a conversation: research a company from a domain, classify a
809
- message, draft an opening line, pull a field out of a document.
850
+ message, draft an opening line, take a shipping address mid-call.
810
851
 
811
852
  `config` is:
812
853
 
@@ -818,10 +859,18 @@ message, draft an opening line, pull a field out of a document.
818
859
  `.direction` — there is no call.
819
860
  - **`llm`** — one model, with the same `fallback`, `reasoning_effort`,
820
861
  `priority` and `builtin_tools` an agent's LLM has. A provider tool runs inside
821
- a step rather than as one, so it costs no steps and real seconds. There is no
822
- `stt`, `tts`, `realtime`, `greeting`, `turn_handling`, `avatar`, `handoffs`,
823
- `recording`, `analysis`, `kb_ids` or lifecycle hook — a task has nobody to
824
- hear, nobody to greet, nothing to hand over and one turn to hook.
862
+ a step rather than as one, so it costs no steps and real seconds. It is the
863
+ one media slot a task keeps, because an LLM is stateless per request and
864
+ swapping one in rebuilds nothing.
865
+ - **`kb_ids`**, **`on_enter`**, **`on_exit`**, **`on_user_turn_completed`**
866
+ exactly an agent's. `on_user_turn_completed` only ever fires when an agent
867
+ entered the task; a standalone run has nobody to take a turn.
868
+ - There is no `stt`, `tts`, `realtime`, `language`, `turn_handling`, `channel`,
869
+ `greeting`, `avatar`, `recording`, `analysis`, `conversation` or `handoffs`.
870
+ A task runs on the media of the session that entered it, or on no media at
871
+ all — which is what lets one task serve a voice agent and an email batch.
872
+ `handoffs` is refused with a reason: a task hands control back to whoever
873
+ entered it, so handing the conversation on would strand that return.
825
874
  - **`tools`** / **`mcps`** — exactly an agent's, attached by id or defined
826
875
  inline, and pinned by publish exactly as an agent's are: republishing a tool
827
876
  does not change a published task until that task is published again.
@@ -832,15 +881,26 @@ message, draft an opening line, pull a field out of a document.
832
881
  that failure costs nothing. A value for a name the task does not declare is
833
882
  refused too, rather than silently dropped — which is the one difference from an
834
883
  agent, whose key space is open.
884
+
885
+ **They are also the schema of the tool an agent enters the task with**, minus
886
+ every name that agent declares and every name the session was started with. So
887
+ declare a variable only for what the caller or the model must supply: anything
888
+ the task can read for itself — `{{userdata.order_id}}`, `{{vars.region}}`,
889
+ `{{system_vars.date}}` — belongs in the prompt. Declare it instead and the
890
+ model is asked to invent it, and it will.
835
891
  - **`output`** — a flat list of the fields the model must produce, each with a
836
892
  `name`, a `type` (`string`, `boolean`, `integer` or `number`) and a
837
893
  `description`. At most 25, and at least one **to publish** — a draft may have
838
894
  none. No arrays and no nested objects: a task that wants to return five
839
895
  talking points returns one string containing them.
840
896
  - **`max_steps`** (default 25, max 50) — how many LLM → tools → LLM **rounds**
841
- the run may take. A round, not a tool call: four tools in one reply cost one
842
- step. This is the runaway-loop guard.
843
- - **`timeout_seconds`** (default 300, max 600)the real time budget.
897
+ a STANDALONE run may take. A round, not a tool call: four tools in one reply
898
+ cost one step. This is the runaway-loop guard. Entered by an agent the task
899
+ runs on the calling session's budget instead three rounds per reply on
900
+ voice and video, twenty-five on text, refreshed on every user turn.
901
+ - **`timeout_seconds`** (default 300, max 600) — the real time budget, and the
902
+ one setting that applies both ways. Entered by an agent it is the only bound
903
+ on how long the task may hold the caller: keep it short on a voice agent.
844
904
 
845
905
  A name may not appear in both `vars` and `output`: a run's inputs and its output
846
906
  are read side by side, so a collision would make one of the two unreachable.
@@ -872,9 +932,15 @@ yours: it changes what every run and every live email batch does.
872
932
 
873
933
  The model does not "return" the output. At compile time the task gains one
874
934
  generated tool, **`submit_result`**, whose arguments are exactly the `output`
875
- fields, and one generated paragraph telling it that calling that tool is how the
876
- run finishes. Both are written for you: never declare a tool named
877
- `submit_result`, and never write that paragraph into the prompt yourself.
935
+ fields. Never declare a tool of that name yourself.
936
+
937
+ **Nothing is appended to a task's prompt.** `submit_result_description` is the
938
+ whole of what the model is told about how a run ends, so it has to say that
939
+ calling the tool IS the ending — a written answer produces nothing — and that a
940
+ value the model could not determine goes in as `null`. It is required and
941
+ non-empty, but a new task only carries the one-line stub
942
+ `"Submit the result and finish."`: **replace it.** A task whose finishing is
943
+ described by that stub is a task relying on the model to guess.
878
944
 
879
945
  Every output field is **required and nullable** in that tool. The model must say
880
946
  something about every field, including "I could not find it" — an optional field
@@ -883,6 +949,15 @@ generated yet" then look identical to whoever reads the row. Say so in each
883
949
  field's `description`: that description is the only instruction the model gets
884
950
  about what belongs there.
885
951
 
952
+ A task an agent enters also gets **`finish_without_result`**, which abandons the
953
+ job and fails the calling agent's tool call.
954
+ `finish_without_result_description` — required and non-empty too, and starting as
955
+ the stub `"Give up and finish without a result."` — is the only thing saying when
956
+ that is allowed: **a task that gives up on work it should have finished is fixed
957
+ there, not in the prompt.** Narrow it to the caller actually changing their mind;
958
+ "I could not work out a value" is a `null`, not a reason to abandon. Publishing
959
+ refuses either description blank.
960
+
886
961
  ### Reading a run
887
962
 
888
963
  `run_task` **executes for real**: the tools call the tenant's endpoints with
@@ -1060,8 +1135,8 @@ afterwards will not forgive us:
1060
1135
  opted in. This runs on *their* Resend account under *their* agreement.
1061
1136
  - **Nothing is sent that they have not reviewed and selected.** Creating a batch
1062
1137
  only drafts.
1063
- - **Every row runs the task's CURRENT PUBLISHED version**, re-read every pass, so
1064
- publishing mid-batch changes every row drafted after that moment. Which version
1138
+ - **Every row runs the task's CURRENT PUBLISHED version**, re-read as drafting
1139
+ goes, so publishing mid-batch changes every row drafted after that moment. Which version
1065
1140
  wrote which rows is on the batch as `drafted_versions`, and
1066
1141
  `redraft_email_batch_recipients` with `selection: "stale_version"` is how the
1067
1142
  older ones are rewritten.
@@ -1114,9 +1189,10 @@ returns a **send** you can steer:
1114
1189
  another send. It is also the ONLY way to change what a scheduled send
1115
1190
  contains: a send's rows are fixed when it is created, and there is no verb for
1116
1191
  pulling rows out of one.
1117
- - `get_email_send` carries `next_send_at`, which is how "waiting for Monday" is
1118
- told apart from "stuck", and covers a start time, a shut window and a spent
1119
- daily cap alike.
1192
+ - `get_email_send` carries `next_send_at` and `next_send_reason` (`start`,
1193
+ `window`, `daily_cap`, `retry`, `gap`), which is how "waiting for Monday" is
1194
+ told apart from "stuck". `patch_email_send` reaches a live send within five
1195
+ minutes, so raising a spent cap or removing a window needs no cancel.
1120
1196
 
1121
1197
  **The safeguard here is a RATE, not a row count.** `send_daily_cap` (200 by
1122
1198
  default, per batch, `null` for uncapped) is what stands between a 5 000-row list
@@ -1158,15 +1234,16 @@ ours — Resend keeps one and auto-suppresses hard bounces and complaints.
1158
1234
  ### Watching it
1159
1235
 
1160
1236
  `get_email_batch` carries live counts, `failure_reason`, `sent_today` (against
1161
- `send_daily_cap`), `drafted_versions` and the drafting cost so far. A batch that
1162
- stops itself did so after ten consecutive drafting failures, or on the first
1163
- `configuration` failure — a deleted task, a field map an edit broke — because
1164
- those will fail identically for every remaining row.
1165
-
1166
- **A send fails on its own, and never takes the batch with it.** Ten consecutive
1167
- provider failures, or one account-level refusal (a revoked key, an unverified
1168
- domain, an exhausted quota), stop that send and return its untouched rows to the
1169
- review table as drafts. Fix the cause and create another send; the drafts are
1237
+ `send_daily_cap`), `drafted_versions`, `stale_redraftable` and the drafting cost
1238
+ so far.
1239
+
1240
+ **Stopping itself comes in two shapes, and they need different advice.** Ten
1241
+ consecutive failures **pause** a batch or a send: everything is where it was and
1242
+ `resume` continues, so say that rather than suggesting the work be rebuilt.
1243
+ `failed` is the deterministic stop a deleted task, a field map an edit broke, a
1244
+ revoked key, an unverified domain where trying again cannot help until
1245
+ something outside Talqing changes. A failed SEND returns its untouched rows to
1246
+ the review table as drafts and never takes the batch with it; the drafts are
1170
1247
  still there. In the other direction, pausing or cancelling the *batch* stops
1171
1248
  drafting and does not touch a send that is already scheduled or going out.
1172
1249
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@talqing/mcp",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "MCP server for building Talqing AI voice, video and text agents from Claude Code, Codex, or any MCP client.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://talqing.com",
package/tools.json CHANGED
@@ -954,6 +954,76 @@
954
954
  "read_only": false,
955
955
  "role": "write"
956
956
  },
957
+ {
958
+ "description": "List WebSocket media-stream connections a partner can dial.",
959
+ "method": "GET",
960
+ "name": "list_stream_connections",
961
+ "parameters": {
962
+ "additionalProperties": true,
963
+ "description": "Arguments not inlined: call describe_function('list_stream_connections').",
964
+ "properties": {},
965
+ "type": "object"
966
+ },
967
+ "path": "/v1/streams",
968
+ "read_only": true,
969
+ "role": "read"
970
+ },
971
+ {
972
+ "description": "Create a connection a streaming partner can dial.",
973
+ "method": "POST",
974
+ "name": "create_stream_connection",
975
+ "parameters": {
976
+ "additionalProperties": true,
977
+ "description": "Arguments not inlined: call describe_function('create_stream_connection').",
978
+ "properties": {},
979
+ "type": "object"
980
+ },
981
+ "path": "/v1/streams",
982
+ "read_only": false,
983
+ "role": "write"
984
+ },
985
+ {
986
+ "description": "One stream connection, with the URL to hand the partner.",
987
+ "method": "GET",
988
+ "name": "get_stream_connection",
989
+ "parameters": {
990
+ "additionalProperties": true,
991
+ "description": "Arguments not inlined: call describe_function('get_stream_connection').",
992
+ "properties": {},
993
+ "type": "object"
994
+ },
995
+ "path": "/v1/streams/{connection_id}",
996
+ "read_only": true,
997
+ "role": "read"
998
+ },
999
+ {
1000
+ "description": "Rename a connection, point it at another agent, or disable it.",
1001
+ "method": "PATCH",
1002
+ "name": "patch_stream_connection",
1003
+ "parameters": {
1004
+ "additionalProperties": true,
1005
+ "description": "Arguments not inlined: call describe_function('patch_stream_connection').",
1006
+ "properties": {},
1007
+ "type": "object"
1008
+ },
1009
+ "path": "/v1/streams/{connection_id}",
1010
+ "read_only": false,
1011
+ "role": "write"
1012
+ },
1013
+ {
1014
+ "description": "Delete a stream connection. Calls it already carried are kept.",
1015
+ "method": "DELETE",
1016
+ "name": "delete_stream_connection",
1017
+ "parameters": {
1018
+ "additionalProperties": true,
1019
+ "description": "Arguments not inlined: call describe_function('delete_stream_connection').",
1020
+ "properties": {},
1021
+ "type": "object"
1022
+ },
1023
+ "path": "/v1/streams/{connection_id}",
1024
+ "read_only": false,
1025
+ "role": "write"
1026
+ },
957
1027
  {
958
1028
  "description": "Dial a real phone number and have a published agent take the call.",
959
1029
  "method": "POST",
@@ -1235,7 +1305,7 @@
1235
1305
  "role": "write"
1236
1306
  },
1237
1307
  {
1238
- "description": "Take drafted rows out of consideration. Reversible with `restore`.",
1308
+ "description": "Take rows out of consideration. Reversible with `restore`.",
1239
1309
  "method": "POST",
1240
1310
  "name": "skip_email_batch_recipients",
1241
1311
  "parameters": {
@@ -1752,6 +1822,20 @@
1752
1822
  "read_only": true,
1753
1823
  "role": "read"
1754
1824
  },
1825
+ {
1826
+ "description": "Search the language models a provider offers too many of to list.",
1827
+ "method": "GET",
1828
+ "name": "search_models",
1829
+ "parameters": {
1830
+ "additionalProperties": true,
1831
+ "description": "Arguments not inlined: call describe_function('search_models').",
1832
+ "properties": {},
1833
+ "type": "object"
1834
+ },
1835
+ "path": "/v1/catalog/models",
1836
+ "read_only": true,
1837
+ "role": "read"
1838
+ },
1755
1839
  {
1756
1840
  "description": "The Anam avatar gallery \u2014 the faces a video agent can wear.",
1757
1841
  "method": "GET",