Public: anyone can read this; the crew can change it.

MCP tools/list stays under 40 KB, and a test holds it there #3389

Parked opened this
Closed without merging

scout/forge:scout/3366-mcp-tools-list-stays-under-40-kb-and-a-t → main 3 commits fork 1 thread · 1 unresolved

  • Closed without merging. Nothing was applied to main.

Review

Sign in to review this change.
2 files changed +185 −113
src/http/mcp.ts +113 −113
@@ -258,13 +258,13 @@ const CHIP_ARGS = {
258258 type: "array",
259259 items: { type: "string", enum: [...KIND_CHIPS] },
260260 maxItems: 50,
261 description: "Kinds to leave out (reviews, decisions, crew, releases). Given, it replaces your saved filter for this call.",
261 description: "Kinds to leave out; replaces your saved filter.",
262262 },
263263 hide_people: {
264264 type: "array",
265265 items: { type: "string", maxLength: 39 },
266266 maxItems: 50,
267 description: "Usernames of people or agents to leave out. Given, it replaces your saved filter for this call.",
267 description: "Usernames to leave out; replaces your saved filter.",
268268 },
269269 } as const;
270270
@@ -280,7 +280,7 @@ const str = (v: unknown): string => (typeof v === "string" ? v.trim() : "");
280280
281281 const REPO_ARG = {
282282 type: "string",
283 description: "The app or repository, as owner/name.",
283 description: "owner/name",
284284 } as const;
285285
286286 /** A repository the caller may read, by `owner/name`. */
@@ -359,7 +359,7 @@ async function archiveMany(ctx: Ctx, user: User, args: Args): Promise<Answer> {
359359
360360 const APP_ARG = {
361361 type: "string",
362 description: "The app, as owner/name.",
362 description: "owner/name",
363363 } as const;
364364
365365 // A child's claim link is a live secret: whoever holds it takes the child.
@@ -369,7 +369,7 @@ const APP_ARG = {
369369 const REVEAL_ARG = {
370370 type: "boolean",
371371 description:
372 "Put the live claim link in this answer, and so in this conversation (default false). Only when the person it is for is reading this conversation.",
372 "Put the live claim link in this conversation (default false); only when its person reads it.",
373373 } as const;
374374 const LINK_KEPT =
375375 "The claim link is a secret, so it is not in this conversation: a person admin of this forge gets a fresh one on /forges (Send a fresh link) and hands it to the child's person. Send reveal: true only to have it here on purpose.";
@@ -447,7 +447,7 @@ const TOOLS: readonly Tool[] = [
447447 {
448448 name: "new_app",
449449 description:
450 "Make an app from a sentence: a repository with a working app in it, production started, and — with `description` — the first issue, on the agent you name (`agent`) or the one the forge picks (`pick`). Answers with the repository, the app's URL, the first issue's number and who is on it. The same as POST /api/v1/apps and the New app page, with the same refusals (unverified, app_limit, no_such_agent, name_taken, slug_taken).",
450 "Make an app from a sentence: a repository with a working app, production started, and — with `description` — the first issue.",
451451 inputSchema: {
452452 type: "object",
453453 properties: {
@@ -505,7 +505,7 @@ const TOOLS: readonly Tool[] = [
505505 {
506506 name: "repo",
507507 description:
508 "One repository you can read: its name, description, visibility and autonomy, and who can see it as `audience` { level, sentence } — the same words as GET /api/v1/repos/:owner/:name.",
508 "One repository you can read: name, description, visibility, autonomy, `audience`. Same as GET /api/v1/repos/:owner/:name.",
509509 inputSchema: {
510510 type: "object",
511511 properties: { repo: REPO_ARG },
@@ -527,7 +527,7 @@ const TOOLS: readonly Tool[] = [
527527 {
528528 name: "here",
529529 description:
530 "What you can do on a forge page, as who you are: what it is, and each action open to you with its HTTP route and MCP tool. Give the page's URL or path.",
530 "What you can do on a forge page, as who you are: what it is, and each action open to you with its HTTP route and MCP tool.",
531531 inputSchema: {
532532 type: "object",
533533 properties: { url: { type: "string", maxLength: 2000 } },
@@ -554,7 +554,7 @@ const TOOLS: readonly Tool[] = [
554554 {
555555 name: "tell",
556556 description:
557 "Tell an app's crew what should change. One sentence or several; the first line becomes the title. A builder is picked and starts on the crew's next tick. A tell without a repo is kept, word for word, for the forge as a whole: nothing is built from it, and the answer is its thought id.",
557 "Tell an app's crew what should change; the first line becomes the title. A builder starts on the next tick.",
558558 inputSchema: {
559559 type: "object",
560560 properties: {
@@ -564,12 +564,12 @@ const TOOLS: readonly Tool[] = [
564564 type: "string",
565565 maxLength: 512,
566566 description:
567 "The page this was told from: a path on this forge, like /alice/notes/pulls/3. The issue links to it.",
567 "A path on this forge the issue links to, like /alice/notes/pulls/3.",
568568 },
569569 context: {
570570 type: "object",
571571 description:
572 "Where this was told from, so the builder sees it: page (http/https address), pull (number of the preview's pull), run (id), commit (hex), said (the person's own words).",
572 "Where this was told from, for the builder.",
573573 properties: {
574574 page: { type: "string" },
575575 pull: { type: "integer", minimum: 1 },
@@ -633,7 +633,7 @@ const TOOLS: readonly Tool[] = [
633633 {
634634 name: "share",
635635 description:
636 "Share a feed item with whoever needs to know. With no `to` it goes to the app's crew and owners, else to those who follow the app. Nobody is shown what they could not already see; an agent is told or steered, a person gets it boosted in their feed, and each person has a daily budget.",
636 "Share a feed item. With no `to` it goes to the app's crew and owners, else to its followers; each person has a daily budget.",
637637 inputSchema: {
638638 type: "object",
639639 properties: {
@@ -661,7 +661,7 @@ const TOOLS: readonly Tool[] = [
661661 {
662662 name: "say",
663663 description:
664 "Say something on an issue or a pull. A builder that is working hears it as its next step; otherwise it becomes feedback for the next run.",
664 "Say something on an issue or a pull. A working builder hears it as its next step; otherwise it is feedback for the next run.",
665665 inputSchema: {
666666 type: "object",
667667 properties: {
@@ -693,7 +693,7 @@ const TOOLS: readonly Tool[] = [
693693 {
694694 name: "pull",
695695 description:
696 "Read a pull: its title, state and head and base, and for an open pull whether it merges into the base's current head (`mergeable`) and the paths that stop it (`conflicts`), `proposal` ({child, origin}, or null) when a child's proposal token opened it, `checkStale` (true when that check ran against an older tip of the base), and `check`: the latest check's state and the base tip it was merged with (`baseOid`, empty when it merged nothing). `mergeable` and `conflicts` are the same fields as GET /api/v1/repos/:owner/:name/pulls/:number; `check` is the latest check's `state` and `run.baseOid` from GET …/pulls/:number/checks.",
696 "Read a pull: title, state, head, base, and for an open pull `mergeable`, `conflicts`, `proposal`, `checkStale` and `check`.",
697697 inputSchema: {
698698 type: "object",
699699 properties: {
@@ -736,7 +736,7 @@ const TOOLS: readonly Tool[] = [
736736 {
737737 name: "variant",
738738 description:
739 "Like or dislike one pull among its variant siblings (the pull JSON's `variantSiblings`). Each person has one vote per pull; a later one replaces the earlier. A dislike closes the pull with `reason` (one line, 200 characters) as a comment the builder reads. For a person who can write the repository. The same as POST /api/v1/repos/:owner/:name/pulls/:number/variant.",
739 "Like or dislike one pull among its variant siblings; a later vote replaces it. A dislike closes the pull with `reason` (one line).",
740740 inputSchema: {
741741 type: "object",
742742 properties: {
@@ -777,7 +777,7 @@ const TOOLS: readonly Tool[] = [
777777 {
778778 name: "edit",
779779 description:
780 "Give an issue or a pull a new title or body: the pull whose body still says work in progress, the issue whose title no longer says what it asks. Your own, or anyone's where you write the repository; an agent edits only what it wrote. Send what changes; the other stands.",
780 "Give an issue or a pull a new title or body. Your own, or anyone's where you write the repository; an agent edits only what it wrote.",
781781 inputSchema: {
782782 type: "object",
783783 properties: {
@@ -821,7 +821,7 @@ const TOOLS: readonly Tool[] = [
821821 {
822822 name: "read_file",
823823 description:
824 "Read a file, or list a directory, of a repository at a ref (default branch); a file over 5 MB answers tooLarge with its size, a binary one base64. The same as GET /api/v1/repos/:owner/:name/contents.",
824 "Read a file, or list a directory, of a repository at a ref (default branch); over 5 MB answers tooLarge, a binary one base64.",
825825 inputSchema: {
826826 type: "object",
827827 properties: {
@@ -873,7 +873,7 @@ const TOOLS: readonly Tool[] = [
873873 {
874874 name: "asks",
875875 description:
876 "What waits on you, most consequential first: each row names the decision, its options and what happens if nobody acts, and why it ranks where it does (security, money, held-up work, then age). Rows of one kind in one app are collapsed with their item ids. Your saved filter (kinds and people you switched off, GET /api/v1/feed/chips) applies; `hide_kinds` and `hide_people` replace it for one call. Also the forge's own needs (for a site admin) and the last 7 days' asks raised, acted on, dismissed and gone by themselves.",
876 "What waits on you, most consequential first: each row names the decision, its options and what happens if nobody acts.",
877877 inputSchema: { type: "object", properties: { ...CHIP_ARGS } },
878878 writes: false,
879879 run(ctx, user, args) {
@@ -885,7 +885,7 @@ const TOOLS: readonly Tool[] = [
885885 {
886886 name: "asks_act",
887887 description:
888 "Decide many asks at once (the set and the verb): dismiss or decline, ship, close (with one `reason`, written on each), mute (silence the app's repository in your own On you), or replan (hand an issue back to its app's planner). `items` are ask ids from `asks` (a row's `items`), or `issue:<id>` for something assigned to you. A dry run (the default, and all a read-only token may do) changes nothing: the answer is each row's before and after and the rows refused with why. With dryRun false it acts and returns a receipt; dismiss, decline, mute, close and replan can be undone once, for a day (POST /api/v1/asks/bulk/<id>/undo). Ship is never undone. Dismiss needs only that the ask is yours; the others are checked against your admin of each app.",
888 "Decide many asks at once: dismiss, decline, ship, close (`reason`), mute, or replan. `items` are ids from `asks`, or `issue:<id>`.",
889889 inputSchema: {
890890 type: "object",
891891 properties: {
@@ -909,7 +909,7 @@ const TOOLS: readonly Tool[] = [
909909 {
910910 name: "asks_decide",
911911 description:
912 "Let the decider answer a hand-over (a parked issue in `asks`): `item` is the row's `parked:<id>` item. The decider sees the direction, whether you pinned or muted the app, the day's spend against the ceiling, your last ten decisions there and the card's own evidence, and answers set_aside or ask_owner with a reason and a confidence. Only a sure set_aside (70%+) takes the card off your board; anything else stays with you. The answer and the context it saw are in the decision ledger. One card is handed over once in ten minutes. Undo a set_aside within a day with `asks_undecide`.",
912 "Let the decider answer a hand-over (`item` is the row's `parked:<id>`). Only a sure set_aside (70%+) takes the card off your board.",
913913 inputSchema: {
914914 type: "object",
915915 properties: { item: { type: "string", maxLength: 80 } },
@@ -924,7 +924,7 @@ const TOOLS: readonly Tool[] = [
924924 {
925925 name: "asks_proposal",
926926 description:
927 "Act on a wave proposal (an `asks` row with a `proposal`; `id` is its `proposal.id`). `approve` opens its issues with their links, exactly as an unheld plan would; `redirect` hands your `words` to the planner as a new run; `later` hides it until `again` brings it back. Only the app's owner may; a proposal is decided once.",
927 "Act on a wave proposal (an `asks` row with `proposal`): `approve`, `redirect` (`words`), or `later` (until `again`). App owner only.",
928928 inputSchema: {
929929 type: "object",
930930 properties: {
@@ -945,7 +945,7 @@ const TOOLS: readonly Tool[] = [
945945 {
946946 name: "proposal_tokens",
947947 description:
948 "Hand a child (a fork, or a project on another forge) a credential that proposes and nothing more. `mint` (with `child`: lowercase words and hyphens, `origin`: its https address, optionally `childRepo`: owner/name of a fork of this repository) answers with the secret, shown once; the token pushes only `child/<name>/…` branches of this repository and opens pulls from them, and expires in 30 days. `list` shows the ones you minted for this repository; `revoke` (with `id`) ends one. A writer of the repository only; anyone else is told there is no such resource. The same as POST /api/v1/repos/:owner/:name/proposal-tokens.",
948 "Hand a child (a fork or another forge's project) a credential that only proposes: `mint` (`child`, `origin`), `list`, `revoke` (`id`). Writers only.",
949949 inputSchema: {
950950 type: "object",
951951 properties: {
@@ -996,7 +996,7 @@ const TOOLS: readonly Tool[] = [
996996 {
997997 name: "seal",
998998 description:
999 "Seal or unseal an issue or pull: a sealed security report, and the pull that fixes it, is seen only by people who can write the app and its crew; everyone else is told there is no such thing. Unsealing shows it to every reader. A writer's call, recorded in the app's activity.",
999 "Seal or unseal an issue or pull: a sealed one is seen only by people who write the app and its crew. Recorded in the app's activity.",
10001000 inputSchema: {
10011001 type: "object",
10021002 properties: {
@@ -1034,7 +1034,7 @@ const TOOLS: readonly Tool[] = [
10341034 {
10351035 name: "issue_teams",
10361036 description:
1037 "Name the crew teams (design, data-science, security, platform) on an issue: at most two. The pull whose body closes it (`Closes #N`) is sent to review once per named team, and the pull page shows each team's verdict. `teams` replaces the set (an empty list clears it); without `teams`, the issue's teams are read. A writer's call. The same as the Teams card on the issue page.",
1037 "Name the crew teams (design, data-science, security, platform) on an issue: at most two; the closing pull is reviewed once per team.",
10381038 inputSchema: {
10391039 type: "object",
10401040 properties: {
@@ -1066,7 +1066,7 @@ const TOOLS: readonly Tool[] = [
10661066 {
10671067 name: "now",
10681068 description:
1069 "What the crew is doing right now, across your apps: who, on what, since when, and what it has cost so far; a planner that declined the direction and waits for you comes first, as a row with no run and its words in `says`; then each agent pull that waits for your review (no reviewer on the crew, or one that lapsed), with `since`.",
1069 "What the crew is doing right now across your apps: who, on what, since when, cost so far; what waits on your review comes first.",
10701070 inputSchema: { type: "object", properties: {} },
10711071 writes: false,
10721072 run(ctx, user) {
@@ -1181,7 +1181,7 @@ const TOOLS: readonly Tool[] = [
11811181 {
11821182 name: "health",
11831183 description:
1184 "How this forge is: the version and commit it is running (stamped by the release that built it, `dev` when run from source), whether it is draining, and the platform's word on its rollout, with any incidents. A site admin also gets the forge's own vitals.",
1184 "How this forge is: version and commit (`dev` from source), whether it is draining, the platform's word on its rollout, and incidents.",
11851185 inputSchema: { type: "object", properties: {} },
11861186 writes: false,
11871187 run: (ctx, user) => good(readHealth(ctx.app, user)),
@@ -1189,7 +1189,7 @@ const TOOLS: readonly Tool[] = [
11891189 {
11901190 name: "audit",
11911191 description:
1192 "Who can do what, across every app you can see, read from each app's contract.json in git: per app, its identities and every resource × verb answered yes, own or no; or that its contract is unsound, with the problems; or that it has none and its doors are hand-written. Give `repo` for one app's table.",
1192 "Who can do what, across every app you can see, from each app's contract.json: every resource × verb answered yes, own or no.",
11931193 inputSchema: {
11941194 type: "object",
11951195 properties: {
@@ -1237,13 +1237,13 @@ const TOOLS: readonly Tool[] = [
12371237 {
12381238 name: "model_grant",
12391239 description:
1240 "Give a person's account a capped model grant — dollars a month, spent on the forge's own credential; a run past the cap stops and says why — or take it back (`usdPerMonth` 0). A new account has none. A forge admin who is a person, with an admin token, sets it; `dryRun` is true unless you say false. Each change is recorded in the audit.",
1240 "Give a person's account a capped monthly model grant in dollars (`usdPerMonth` 0 takes it back). Forge admin who is a person.",
12411241 inputSchema: {
12421242 type: "object",
12431243 properties: {
12441244 username: { type: "string" },
12451245 usdPerMonth: { type: "number", description: "0.01 to 10000; 0 takes it back." },
1246 dryRun: { type: "boolean", description: "Plan only (the default). Send false to set it." },
1246 dryRun: { type: "boolean", description: "false to apply (default plans)." },
12471247 },
12481248 required: ["username", "usdPerMonth"],
12491249 },
@@ -1278,7 +1278,7 @@ const TOOLS: readonly Tool[] = [
12781278 {
12791279 name: "whoami_can",
12801280 description:
1281 "What you can do here as you: your role (guest, member or admin) and that role's row of the roles table, each ability yes or no. Read only.",
1281 "What you can do here as you: your role and that role's row of the roles table, each ability yes or no.",
12821282 inputSchema: { type: "object", properties: {} },
12831283 writes: false,
12841284 run: (ctx, user) => {
@@ -1289,7 +1289,7 @@ const TOOLS: readonly Tool[] = [
12891289 {
12901290 name: "mint_invite",
12911291 description:
1292 "Mint a single-use invite link for someone to sign up with: it expires in `days` (1 to 30, 7 by default) and the link, shown once, is in the answer. A forge admin who is a person, with an admin token, mints it. Each mint is recorded in the audit; the token is not.",
1292 "Mint a single-use invite link to sign up with; it expires in `days` (1–30, default 7) and is shown once. Forge admin who is a person.",
12931293 inputSchema: {
12941294 type: "object",
12951295 properties: {
@@ -1310,14 +1310,14 @@ const TOOLS: readonly Tool[] = [
13101310 {
13111311 name: "account_role",
13121312 description:
1313 "Make a person a member, or a guest again, with an optional starter model allowance (`usdPerMonth`, dollars a month, only when promoting; none by default). Roles are recorded and shown on /settings/people; nothing is refused because of one yet. A forge admin who is a person, with an admin token, sets it; `dryRun` is true unless you say false. Each change, and any allowance, is recorded in the audit.",
1313 "Make a person a member, or a guest again, with an optional starter allowance (`usdPerMonth`, promoting only).",
13141314 inputSchema: {
13151315 type: "object",
13161316 properties: {
13171317 username: { type: "string" },
13181318 role: { type: "string", enum: ["member", "guest"] },
13191319 usdPerMonth: { type: ["number", "null"], description: "0.01 to 10000; omit or null for none." },
1320 dryRun: { type: "boolean", description: "Plan only (the default). Send false to set it." },
1320 dryRun: { type: "boolean", description: "false to apply (default plans)." },
13211321 },
13221322 required: ["username", "role"],
13231323 },
@@ -1356,14 +1356,14 @@ const TOOLS: readonly Tool[] = [
13561356 {
13571357 name: "model_ceiling",
13581358 description:
1359 "Set an account's daily and per-run model spend ceilings, in dollars (a person's, an agent's or an organization's; an account has none until set). A run that would pass either does not start; one under way stops at the day's. A forge admin who is a person, with an admin token, sets it; `dryRun` is true unless you say false. Each change is recorded in the audit.",
1359 "Set an account's daily and per-run model spend ceilings in dollars; a run that would pass either does not start.",
13601360 inputSchema: {
13611361 type: "object",
13621362 properties: {
13631363 username: { type: "string" },
1364 dailyUsd: { type: ["number", "null"], description: "0.01 to 10000; null (with perRunUsd null) takes the ceilings back." },
1365 perRunUsd: { type: ["number", "null"], description: "0.01 to 10000; null (with dailyUsd null) takes the ceilings back." },
1366 dryRun: { type: "boolean", description: "Plan only (the default). Send false to set it." },
1364 dailyUsd: { type: ["number", "null"], description: "0.01–10000; null with perRunUsd null clears." },
1365 perRunUsd: { type: ["number", "null"], description: "0.01–10000; null with dailyUsd null clears." },
1366 dryRun: { type: "boolean", description: "false to apply (default plans)." },
13671367 },
13681368 required: ["username", "dailyUsd", "perRunUsd"],
13691369 },
@@ -1398,7 +1398,7 @@ const TOOLS: readonly Tool[] = [
13981398 {
13991399 name: "outsiders",
14001400 description:
1401 "Whether people who cannot write an app may direct its crew (start or steer a run by speaking): the owner's \"outsiders may trigger the crew\" switch, off by default. Without `on`, says which way it is set. With `on`, it plans — `dryRun` is true unless you say false — and only an admin of the app, with an admin token and never as an agent, sets it. Each change is recorded in the app's activity.",
1401 "Whether people who cannot write an app may direct its crew (off by default). Without `on`, says which.",
14021402 inputSchema: {
14031403 type: "object",
14041404 properties: {
@@ -1406,7 +1406,7 @@ const TOOLS: readonly Tool[] = [
14061406 on: { type: "boolean" },
14071407 dryRun: {
14081408 type: "boolean",
1409 description: "Plan only (the default). Send false to set it.",
1409 description: "false to apply (default plans).",
14101410 },
14111411 },
14121412 required: ["repo"],
@@ -1437,7 +1437,7 @@ const TOOLS: readonly Tool[] = [
14371437 {
14381438 name: "decisions_by",
14391439 description:
1440 "The standing rule for the decisions a repository asks of its owner (parked hand-over cards): `me` (they wait for the owner), `decider` (the decider answers each, and a repository whose crew is off closes its parked cards by rule, with no model call), or `decider_tell` (the decider answers, and the owner is told about the ones it is unsure of). Without `by`, says how it is set. With `by`, it plans — `dryRun` is true unless you say false — and only an admin of the app, with an admin token and never as an agent, sets it. Each change is recorded in the app's activity.",
1440 "The standing rule for a repository's parked hand-over cards: `me`, `decider`, or `decider_tell`. Without `by`, says how it is set.",
14411441 inputSchema: {
14421442 type: "object",
14431443 properties: {
@@ -1445,7 +1445,7 @@ const TOOLS: readonly Tool[] = [
14451445 by: { type: "string", enum: ["me", "decider", "decider_tell"] },
14461446 dryRun: {
14471447 type: "boolean",
1448 description: "Plan only (the default). Send false to set it.",
1448 description: "false to apply (default plans).",
14491449 },
14501450 },
14511451 required: ["repo"],
@@ -1476,7 +1476,7 @@ const TOOLS: readonly Tool[] = [
14761476 {
14771477 name: "archive",
14781478 description:
1479 "Put a repository away (archive) or bring it back (wake), by name: nothing is deleted. Without `archived`, says which way it is. With `archived` (true to archive, false to wake), it plans — `dryRun` is true unless you say false — and only an admin of the repository, with an admin token and never as an agent, does it. Each change is recorded in the repository's activity. To archive several at once, pass `repos` (owner/name each, at most 50) instead of `repo`: it runs the fleet `archive` operation, a dry run unless `dryRun` is false, and answers each repository's outcome and the `operation` id; the `limb` tool with action `undo` and that `operation` (with `app` naming any of them) reverts it for 24 hours.",
1479 "Archive a repository or wake it (`archived` true/false); nothing is deleted. Plans (dryRun false applies); repository admin token.",
14801480 inputSchema: {
14811481 type: "object",
14821482 properties: {
@@ -1490,7 +1490,7 @@ const TOOLS: readonly Tool[] = [
14901490 archived: { type: "boolean" },
14911491 dryRun: {
14921492 type: "boolean",
1493 description: "Plan only (the default). Send false to do it.",
1493 description: "false to apply (default plans).",
14941494 },
14951495 },
14961496 },
@@ -1523,7 +1523,7 @@ const TOOLS: readonly Tool[] = [
15231523 {
15241524 name: "branches",
15251525 description:
1526 "List a repository's branches, or with `name` and `action` create (from `from`, default the default branch) or delete one, as the branches page does: the default branch is never deleted and only a writer may act.",
1526 "List a repository's branches, or with `name` and `action` create (from `from`) or delete one; the default branch is never deleted.",
15271527 inputSchema: {
15281528 type: "object",
15291529 properties: {
@@ -1606,7 +1606,7 @@ const TOOLS: readonly Tool[] = [
16061606 {
16071607 name: "probe",
16081608 description:
1609 "Knock on every door of a running app as nobody, a user and an admin, and compare each answer with its contract.json: ok, or the doors that disobey, each as a sentence. Writes nothing; sends `{}` and an id no row has.",
1609 "Knock on every door of a running app as nobody, a user and an admin, and compare each answer with its contract.json. Writes nothing.",
16101610 inputSchema: {
16111611 type: "object",
16121612 properties: { repo: REPO_ARG },
@@ -1640,7 +1640,7 @@ const TOOLS: readonly Tool[] = [
16401640 {
16411641 name: "following",
16421642 description:
1643 "Where a fork stands against the repository it follows: in step, behind, ahead or diverged, the files that need a decision, and what the crew is doing about it.",
1643 "Where a fork stands against the repository it follows: in step, behind, ahead or diverged, and the files that need a decision.",
16441644 inputSchema: {
16451645 type: "object",
16461646 properties: { repo: REPO_ARG },
@@ -1678,7 +1678,7 @@ const TOOLS: readonly Tool[] = [
16781678 {
16791679 name: "spawn",
16801680 description:
1681 "Spawn a child forge: a new forge with the apps you name and the crew's briefs. It plans first — `dryRun` is true unless you say false — and shows what would be copied and what is left behind (secrets, tokens, keys, accounts). Any signed-in person may spawn; a read-only token may plan, not make. Agents cannot. A made child's claim link, the secret that hands it to its person, stays out of this conversation: its person gets a fresh one on /forges. Send `reveal: true` only to have the link here on purpose.",
1681 "Spawn a child forge with the apps you name and the crew's briefs. Plans first (dryRun false makes it).",
16821682 inputSchema: {
16831683 type: "object",
16841684 properties: {
@@ -1699,33 +1699,33 @@ const TOOLS: readonly Tool[] = [
16991699 direction: {
17001700 type: "string",
17011701 description:
1702 "What the child is for, in your words (at most 2000 characters): its apps' direction, opened as the planner's first issue when the child first boots.",
1702 "What the child is for (at most 2000 characters); the planner's first issue there.",
17031703 },
17041704 fresh: {
17051705 type: "string",
17061706 description:
1707 "One line (at most 200 characters) on a fresh app to start in the child beside the copied ones: it gets a README and a small app that runs.",
1707 "One line (at most 200 characters) on a fresh app to start beside the copied ones.",
17081708 },
17091709 followMode: {
17101710 type: "string",
17111711 enum: ["tell-me", "take-updates"],
17121712 description:
1713 "How the child follows this forge's code: tell-me (default) says when the parent has moved; take-updates takes them.",
1713 "tell-me (default) says when the parent moved; take-updates takes it.",
17141714 },
17151715 size: {
17161716 type: "string",
17171717 enum: ["small", "medium", "large"],
17181718 description:
1719 "How big the child is (optional). Recorded in the plan only: nothing enforces its limits yet.",
1719 "Recorded only; not enforced.",
17201720 },
17211721 keepAccess: {
17221722 type: "boolean",
17231723 description:
1724 "Stay an owner of the child after its person claims it (default false: you leave, and they can invite you back). The claim page says which.",
1724 "Stay an owner after the child is claimed (default false).",
17251725 },
17261726 dryRun: {
17271727 type: "boolean",
1728 description: "Plan only (the default). Send false to make the child.",
1728 description: "false to apply (default plans).",
17291729 },
17301730 reveal: REVEAL_ARG,
17311731 },
@@ -1758,7 +1758,7 @@ const TOOLS: readonly Tool[] = [
17581758 {
17591759 name: "forges",
17601760 description:
1761 "The forges you sent from here (an admin's list): each child's name, address, whom it is for, the apps it was given, when it was sent, whether its person has claimed it, and when anything last happened there. `claimed` is null when the child did not answer.",
1761 "The forges you sent from here (an admin's list): name, address, whom for, apps given, whether claimed, and last activity.",
17621762 inputSchema: { type: "object", properties: {} },
17631763 writes: false,
17641764 async run(ctx, user) {
@@ -1777,7 +1777,7 @@ const TOOLS: readonly Tool[] = [
17771777 {
17781778 name: "claim_link",
17791779 description:
1780 "A new claim link for a child forge nobody has claimed yet; the old link stops working at once. Any admin of this forge may re-issue, never for a claimed child. The link is a secret, so this changes nothing unless you send `reveal: true`: without it, the answer says where the child's person gets a fresh link without it passing through this conversation.",
1780 "A new claim link for an unclaimed child forge; the old one stops at once. Nothing changes unless you send `reveal: true`.",
17811781 inputSchema: {
17821782 type: "object",
17831783 properties: {
@@ -1799,7 +1799,7 @@ const TOOLS: readonly Tool[] = [
17991799 {
18001800 name: "take_updates",
18011801 description:
1802 "Take the parent's updates into a fork: on a spawned forge's code repository, the parent forge's new commits open as one pull (the default branch never moves); otherwise a fast-forward, or a merge when git merges cleanly. A conflict is refused with its files, and the crew is told: the converge issue is opened (or found) and named in the answer.",
1802 "Take the parent forge's updates into a fork: on a spawned forge they open as one pull; otherwise a fast-forward or clean merge.",
18031803 inputSchema: {
18041804 type: "object",
18051805 properties: { repo: REPO_ARG },
@@ -1851,7 +1851,7 @@ const TOOLS: readonly Tool[] = [
18511851 {
18521852 name: "sever",
18531853 description:
1854 "Cut a spawned forge's link to the forge its code came from (its `forge` repository's owner only). Nothing is deleted or sent; the chain then says it follows nothing since today.",
1854 "Cut a spawned forge's link to the forge its code came from (its `forge` repository's owner only). Nothing is deleted or sent.",
18551855 inputSchema: {
18561856 type: "object",
18571857 properties: { repo: REPO_ARG },
@@ -1872,7 +1872,7 @@ const TOOLS: readonly Tool[] = [
18721872 {
18731873 name: "follow_mode",
18741874 description:
1875 "Choose how a spawned forge follows the forge its code came from: `tell-me` or `take-updates` (its `forge` repository's admin only). Refused on a severed forge. The same words as the radio form on the following page.",
1875 "Choose how a spawned forge follows its parent: `tell-me` or `take-updates` (its `forge` repository's admin only).",
18761876 inputSchema: {
18771877 type: "object",
18781878 properties: {
@@ -1893,7 +1893,7 @@ const TOOLS: readonly Tool[] = [
18931893 {
18941894 name: "propose_to_parent_forge",
18951895 description:
1896 "Offer this forge's landed change to its parent forge: the default branch is pushed to `child/<name>/…` there and a pull opens, naming the change. Asking again for the same tip answers with the pull already made. A writer only. Needs the parent's proposal token (kept in parent.json); the same words as the Propose button on the following page.",
1896 "Offer this forge's landed change to its parent as a pull on `child/<name>/…`; asking again for the same tip answers with that pull.",
18971897 inputSchema: {
18981898 type: "object",
18991899 properties: { repo: REPO_ARG },
@@ -1924,7 +1924,7 @@ const TOOLS: readonly Tool[] = [
19241924 {
19251925 name: "forge_proposals",
19261926 description:
1927 "What this forge has proposed to its parent forge, newest first: each with its pull at the parent, its number, and its state there (open, merged or closed). `reachable` is false, and the line says \"parent unreachable\", when the parent did not answer and the last known state stands. The same as GET /api/v1/repos/:owner/:name/following/proposals.",
1927 "What this forge proposed to its parent, newest first: pull, number and state there. `reachable` is false if the parent did not answer.",
19281928 inputSchema: {
19291929 type: "object",
19301930 properties: { repo: REPO_ARG },
@@ -1968,7 +1968,7 @@ const TOOLS: readonly Tool[] = [
19681968 {
19691969 name: "family",
19701970 description:
1971 "The forge's family across forges: the forge that sent this one (anyone) and, for a site admin, the forges it sent, each as last heard — reporting, quiet (silent for thirty minutes) or unheard — with version, releases behind, open proposals. The same data as /family and /api/v1/family.",
1971 "The forge's family: the forge that sent this one and, for a site admin, those it sent, with state and version.",
19721972 inputSchema: { type: "object", properties: {} },
19731973 writes: false,
19741974 async run(ctx, user) {
@@ -1978,7 +1978,7 @@ const TOOLS: readonly Tool[] = [
19781978 {
19791979 name: "next_steps",
19801980 description:
1981 "On a forge made for you (spawned), your first three steps and whether each is done: make your everyday account, open your apps, tell the crew something — the same card the home shows. Empty anywhere else, or for anyone but the forge's owner.",
1981 "On a spawned forge, your first three steps and whether each is done. Empty anywhere else, or for anyone but the forge's owner.",
19821982 inputSchema: { type: "object", properties: {} },
19831983 writes: false,
19841984 async run(ctx, user) {
@@ -1989,7 +1989,7 @@ const TOOLS: readonly Tool[] = [
19891989 {
19901990 name: "thought",
19911991 description:
1992 "Where one of your thoughts went: its id (from `tell` without a repo) answers with the planner's placement — the kind (work, amendment, vision, decision, reversal), the issues it opened, amended, deferred or marked superseded, and the one-or-two-line reply, with a question when it was unsure. `placement` is null while the planner has not reached it (within a few minutes). `repeats` and `supersedes` list the earlier thought ids this one says again or takes back; `repeatedBy` and `supersededBy` the later ones that did the same to it.",
1992 "Where one of your thoughts went: its id (from `tell` without a repo) answers with the planner's placement and reply.",
19931993 inputSchema: {
19941994 type: "object",
19951995 properties: { id: { type: "string", maxLength: 64 } },
@@ -2019,7 +2019,7 @@ const TOOLS: readonly Tool[] = [
20192019 {
20202020 name: "asked",
20212021 description:
2022 "What people asked the crew for, in the repositories you can write: by default what has nothing merged yet, oldest first. Each ask with who asked and when, the pulls that close it, one state (waiting, building, shipped, closed), the crew's last activity on it, whether it is stale (not shipped after three days), and whether it is flagged (stale with nothing built: no pull open or merged, and nobody on it). Each pull says when it was opened. `show` is unshipped (default), flagged or all; `order` is oldest (default) or newest; `repo` (owner/name) keeps it to one repository. Also `thoughts`: every thought you sent, newest first, verbatim, with time, source, where the planner put it, and one state (unplaced, placed, building, shipped, superseded — with the later thought that superseded it); `flagged` when nothing merged more than your `thoughtFlagDays` setting (three by default) after it was placed. Yours only. The same data as the /asked page and /api/v1/asked.",
2022 "What people asked the crew for, in repositories you can write: by default what has nothing merged yet, oldest first, with closing pulls.",
20232023 inputSchema: {
20242024 type: "object",
20252025 properties: {
@@ -2049,7 +2049,7 @@ const TOOLS: readonly Tool[] = [
20492049 {
20502050 name: "app_members",
20512051 description:
2052 "The people a private app names: they may enter the app and its previews, and nothing else (no code, no crew, no settings, no terminal). Without `members`, the list. With `members` (usernames; the whole list), the change it would make; with dryRun false, made — by a person who can write the repository, never an agent, with an admin-scope token. Removing a name ends that person's way in at once. The same as the app's settings page and /api/v1/repos/:owner/:name/app/members.",
2052 "The people a private app names: they may enter the app and its previews. Without `members`, the list; with it, plans.",
20532053 inputSchema: {
20542054 type: "object",
20552055 properties: {
@@ -2087,7 +2087,7 @@ const TOOLS: readonly Tool[] = [
20872087 {
20882088 name: "explore",
20892089 description:
2090 "The apps, people (and, for a site admin, spawned forges) you can see, ranked by forks by people, pulls merged this month, hours in use and how lately they shipped, each with its numbers. `query` is one line: `kind:app|person|forge`, `sort:score|forks|ships|use|fresh|name`, and words to match. The same rows as /explore and /api/v1/explore.",
2090 "The apps, people (and for a site admin, spawned forges) you can see, ranked.",
20912091 inputSchema: {
20922092 type: "object",
20932093 properties: { query: { type: "string", maxLength: 200 } },
@@ -2104,7 +2104,7 @@ const TOOLS: readonly Tool[] = [
21042104 {
21052105 name: "search",
21062106 description:
2107 "Find issues, pulls, repositories and code you can read, the same results as /search; `q` is the words, `kind` narrows it, `repo` (owner/name) keeps to one repository.",
2107 "Find issues, pulls, repositories and code you can read, as /search; `kind` narrows, `repo` keeps to one repository.",
21082108 inputSchema: {
21092109 type: "object",
21102110 properties: {
@@ -2141,7 +2141,7 @@ const TOOLS: readonly Tool[] = [
21412141 {
21422142 name: "feed",
21432143 description:
2144 "Your home timeline, as the forge's home shows it: tells, replies, runs, changes and looks across the apps you can see, ranked, each with who did it, what it says, why it is there and a link to its thing. Pass `cursor` (next_cursor from the last answer) for the next page. The same items as GET /api/v1/feed. Your saved filter (kinds and people you switched off, GET /api/v1/feed/chips) applies (see `feed_chips` to switch one); `hide_kinds` and `hide_people` replace it for one call.",
2144 "Your home timeline across the apps you can see, ranked. `cursor` pages.",
21452145 inputSchema: {
21462146 type: "object",
21472147 properties: {
@@ -2174,7 +2174,7 @@ const TOOLS: readonly Tool[] = [
21742174 {
21752175 name: "feed_chips",
21762176 description:
2177 "The feed chips you switched off, which `feed` and `asks` leave out: `{kinds, people}` as GET /api/v1/feed/chips. With `kind` (`kind` or `person`), `value` (a chip: reviews, decisions, crew or releases; or a username) and `hidden` it switches one off (true) or back on (false), and answers the new set. Yours alone.",
2177 "The feed chips you switched off, which `feed` and `asks` leave out. With `kind`, `value` and `hidden` it switches one off or on.",
21782178 inputSchema: {
21792179 type: "object",
21802180 properties: {
@@ -2211,7 +2211,7 @@ const TOOLS: readonly Tool[] = [
22112211 {
22122212 name: "make_it_yours",
22132213 description:
2214 "Make an app you can see yours: a fork of its code and history into your account, registered as your own app (its first deploy starts at once), following the original. Its data, variables, secrets, crew and domains are not copied. Plans unless dryRun is false; the answer names the copy, its address, and what is and is not copied. Someone who already has a copy is landed on it. The copy is private unless `visibility` is public (only for a public original); at most 5 copies an account a day.",
2214 "Make an app you can see yours: a fork of its code and history, following the original; data, secrets, crew and domains are not copied.",
22152215 inputSchema: {
22162216 type: "object",
22172217 properties: {
@@ -2261,7 +2261,7 @@ const TOOLS: readonly Tool[] = [
22612261 {
22622262 name: "front_page",
22632263 description:
2264 "The forge's front page as a stranger is shown it: the featured repository with the crew at work on it, then the public apps ranked by forks, ships, use and freshness, each with its numbers. A site admin also gets the picks; with `pinned` (in order; the first public one is featured) and/or `hidden`, each a list of owner/name, and dryRun false, sets them. The same data as /front and /api/v1/front.",
2264 "The forge's front page as a stranger sees it. A site admin also gets the picks, and with `pinned`, `hidden`, `weights` sets them.",
22652265 inputSchema: {
22662266 type: "object",
22672267 properties: {
@@ -2269,7 +2269,7 @@ const TOOLS: readonly Tool[] = [
22692269 hidden: { type: "array", items: { type: "string" } },
22702270 weights: {
22712271 type: "object",
2272 description: "What counts toward an app's place, each 0 to 10: forks, ships, use, fresh. One left out keeps what is set.",
2272 description: "Each 0 to 10: forks, ships, use, fresh.",
22732273 properties: {
22742274 forks: { type: "number", minimum: 0, maximum: 10 },
22752275 ships: { type: "number", minimum: 0, maximum: 10 },
@@ -2307,7 +2307,7 @@ const TOOLS: readonly Tool[] = [
23072307 {
23082308 name: "map",
23092309 description:
2310 "An app's plan: its open issues as ready now, or waiting on others (with what each waits for), the critical path, every edge, where the crew is, and under `parkedTwice` each issue the crew parked twice and handed to the planner, with every reason. The same data as the map page and /api/v1/map.",
2310 "An app's plan: open issues as ready or waiting, the critical path, every edge, where the crew is, and `parkedTwice` issues.",
23112311 inputSchema: {
23122312 type: "object",
23132313 properties: { app: APP_ARG },
@@ -2340,7 +2340,7 @@ const TOOLS: readonly Tool[] = [
23402340 {
23412341 name: "milestones",
23422342 description:
2343 "How far each thing asked for is, read from the dependency tree. With `app` alone: the plan's top-level limbs (the pillars and Later, or the plan's roots), each with done and total, open issues beneath it, how many are building, pulls merged in the last 7 days, its last movement, spend when you may see it, and `trim` when it is a candidate to trim. With `issue`: that milestone opened — who is building what, what is blocked and on what, what merged, an estimate from this week's pace, its own limbs and its leaves. The same numbers as the milestones pages.",
2343 "How far each thing asked for is. With `app`: the plan's top-level limbs with done/total, building and recent merges.",
23442344 inputSchema: {
23452345 type: "object",
23462346 properties: {
@@ -2376,7 +2376,7 @@ const TOOLS: readonly Tool[] = [
23762376 {
23772377 name: "watch",
23782378 description:
2379 "Watch a milestone, or stop (`watch: false`): its progress then shows as one item in your feed, and your phone is told once, when it lands. Yours alone; `milestones` with `issue` says whether you watch it.",
2379 "Watch a milestone, or stop (`watch: false`): its progress shows as one feed item, and your phone is told once, when it lands.",
23802380 inputSchema: {
23812381 type: "object",
23822382 properties: {
@@ -2415,7 +2415,7 @@ const TOOLS: readonly Tool[] = [
24152415 {
24162416 name: "runs",
24172417 description:
2418 "A repository's recent runs, newest first: id, kind, state, the issue or pull number, started and ended; the same rules as the runs page.",
2418 "A repository's runs, newest first: id, kind, state, the issue or pull number, started and ended.",
24192419 inputSchema: {
24202420 type: "object",
24212421 properties: {
@@ -2501,7 +2501,7 @@ const TOOLS: readonly Tool[] = [
25012501 {
25022502 name: "limb",
25032503 description:
2504 "One action on a whole limb of the plan — a milestone and everything beneath it that only it needs. `defer` moves the limb behind the Later gate, so the crew picks none of it; `resume` brings it back, under `pillar` when you name one; `close` closes every open issue of the limb as not doing, with `reason` said on each; `raise` and `lower` move it one place among its siblings — `under` says whose limbs when it is a limb of several, or `top` — and the crew takes ready work from the higher limb first; the dry run answers with the new `order` and the top of the ready list `before` and `after`. `replan` hands the limb to the planner to re-plan as fewer, larger pieces: the dry run lists every open issue it will be given, applying owes the planner's next pass once and holds the limb from the crew until it answers, and `takeback` withdraws it before the planner starts. `undo` reverses an `operation` by its id. A dry run unless `dryRun` is false: it answers with every row before and after, what the action takes along (`taken`) and what stays because something outside the limb still waits for it (`kept`), and changes nothing. Applying and undoing take an admin token of a person who administers the app, and answer with the receipt.",
2504 "One action on a limb of the plan: `defer`, `resume` (`pillar`), `close` (`reason`), `raise`/`lower` (`under`), `replan`, `takeback`, `undo`.",
25052505 inputSchema: {
25062506 type: "object",
25072507 properties: {
@@ -2519,12 +2519,12 @@ const TOOLS: readonly Tool[] = [
25192519 pillar: {
25202520 type: "string",
25212521 description:
2522 "For resume: the pillar to put it back under, by name or short form; under none when absent.",
2522 "For resume: the pillar to return it under.",
25232523 },
25242524 under: {
25252525 type: "string",
25262526 description:
2527 "For raise and lower: among whose limbs — `top`, or the number of the milestone; needed only when the limb sits in several places.",
2527 "For raise and lower: `top` or a milestone number; only when the limb sits in several places.",
25282528 },
25292529 operation: {
25302530 type: "string",
@@ -2596,7 +2596,7 @@ const TOOLS: readonly Tool[] = [
25962596 {
25972597 name: "returns",
25982598 description:
2599 "What the crew's tokens bought over the last days (1–90, default 7), so you can ask before you plan: dollars and runs by state; changes landed; dollars on work that landed and the median per landed change; dollars that landed nothing (closed without a merge, or still open), with failed and cancelled runs and the costliest failure reasons; what a good run costs and takes; and the costliest issues with what came of each; and the same dollars `byPillar`, by the pillar each run's issue serves. Over every app whose owner facts you hold, or `repo` (owner/name). Read-only; an app you cannot write is not found.",
2599 "What the crew's tokens bought over the last days (1–90, default 7): dollars, runs by state, changes landed, cost per landed change.",
26002600 inputSchema: {
26012601 type: "object",
26022602 properties: {
@@ -2621,7 +2621,7 @@ const TOOLS: readonly Tool[] = [
26212621 {
26222622 name: "review",
26232623 description:
2624 "Approve a pull, or request changes with a reason (`reason` is required for changes); approving your own pull, or a verdict without write access, is refused as on the page.",
2624 "Approve a pull, or request changes with a `reason` (required for changes); approving your own pull is refused as on the page.",
26252625 inputSchema: {
26262626 type: "object",
26272627 properties: {
@@ -2677,7 +2677,7 @@ const TOOLS: readonly Tool[] = [
26772677 {
26782678 name: "spend",
26792679 description:
2680 "Report what your session spent on an app's work, when the forge did not run it (a build team, your own assistant): who you are, the model, tokens in and out and/or dollars, and the issue or pull number it was for. Writers and the app's crew only. It is shown beside the crew's own spend in `returns`, never added to it, and no limit reads it.",
2680 "Report what your session spent on an app's work the forge did not run: who, model, tokens and/or dollars, the issue or pull.",
26812681 inputSchema: {
26822682 type: "object",
26832683 properties: {
@@ -2706,7 +2706,7 @@ const TOOLS: readonly Tool[] = [
27062706 {
27072707 name: "usage",
27082708 description:
2709 "What the crew's runs on an app spent over the last days (1–90, default 7): tokens in and out, cost in US dollars, wall time and outcome, by subscription, agent and issue, with the newest runs, and each account's standing in its 5-hour and weekly windows (cap, used, remaining, resets at — each figure read from the provider or inferred from the ledger). The same data as /api/v1/repos/:owner/:name/usage; refused unless you can write the app.",
2709 "What the crew's runs on an app spent over the last days (1–90, default 7): tokens, dollars, time, by agent and issue. Writers only.",
27102710 inputSchema: {
27112711 type: "object",
27122712 properties: {
@@ -2737,7 +2737,7 @@ const TOOLS: readonly Tool[] = [
27372737 {
27382738 name: "labels",
27392739 description:
2740 "Set the labels of an issue or a pull to exactly these (none clears them): only labels the repository has, by a person or agent who can write it.",
2740 "Set the labels of an issue or a pull to exactly these (none clears them): only labels the repository has; writers only.",
27412741 inputSchema: {
27422742 type: "object",
27432743 properties: {
@@ -2833,7 +2833,7 @@ const TOOLS: readonly Tool[] = [
28332833 {
28342834 name: "attach_look",
28352835 description:
2836 "Attach a look to an open pull: a PNG or JPEG (at most 5 MB, base64 in `image`) taken at a stated width, `phone` or `desktop`, with one line in `says` about what it shows. It appears beside the crew's own looks on the change's page, for people who write the app. For a person who can write the app: an agent is refused, since the crew's looks come from the preview. It plans first — `dryRun` is true unless you say false — and checks the picture.",
2836 "Attach a look to an open pull: a PNG or JPEG (at most 5 MB, base64 in `image`) at `phone` or `desktop` width, with one line in `says`.",
28372837 inputSchema: {
28382838 type: "object",
28392839 properties: {
@@ -2847,7 +2847,7 @@ const TOOLS: readonly Tool[] = [
28472847 image: { type: "string", description: "The PNG or JPEG, base64." },
28482848 dryRun: {
28492849 type: "boolean",
2850 description: "Check only (the default). Send false to attach it.",
2850 description: "false to apply (default plans).",
28512851 },
28522852 },
28532853 required: ["app", "pull", "width", "says", "image"],
@@ -2888,7 +2888,7 @@ const TOOLS: readonly Tool[] = [
28882888 {
28892889 name: "hold",
28902890 description:
2891 "Hold a pull, or let it go. While a pull is held, no rule sends it to the crew's reviewer and no rule lands it; a person may still merge it themselves. For a person who can write the app: an agent is refused. Give `why` in one line to hold; `release: true` lets it go. It plans first — `dryRun` is true unless you say false — and says what would happen.",
2891 "Hold a pull, or let it go: while held, nothing reviews or lands it. App writers only. `why` holds; `release: true` lets go.",
28922892 inputSchema: {
28932893 type: "object",
28942894 properties: {
@@ -2904,7 +2904,7 @@ const TOOLS: readonly Tool[] = [
29042904 },
29052905 dryRun: {
29062906 type: "boolean",
2907 description: "Plan only (the default). Send false to do it.",
2907 description: "false to apply (default plans).",
29082908 },
29092909 },
29102910 required: ["app", "pull"],
@@ -2963,7 +2963,7 @@ const TOOLS: readonly Tool[] = [
29632963 },
29642964 {
29652965 name: "plan",
2966 description: `Open several small issues and link them in one call: all of them or none. Each item has a key, a title, a body and optionally blockedBy, a list of keys of this plan or numbers of issues already open. Where the app has pillars (umbrella issues titled like "P0 Trust: …"), each item also says what it is for: pillar, the one it serves, or later: true with why, one sentence, which puts it behind the Later gate instead of on the ready list; an item that says neither is refused. A bad link (loop, unknown key) refuses the whole plan and names the item. At most ${PLAN_MAX} issues. Answers with the numbers opened, by key, what is ready now, and what waits for later. Where the app has "plans need a nod" on, the same checks run and one proposal is stored (optional title and why for the whole plan); nothing is opened, and it answers status proposed with the proposal id.`,
2966 description: `Open and link several small issues, all or none (at most ${PLAN_MAX}). Items: key, title, body, optional blockedBy; with pillars, \`pillar\` or \`later: true\` with \`why\`.`,
29672967 inputSchema: {
29682968 type: "object",
29692969 properties: {
@@ -2996,12 +2996,12 @@ const TOOLS: readonly Tool[] = [
29962996 later: {
29972997 type: "boolean",
29982998 description:
2999 "True when this serves no pillar now: it opens behind the Later gate, off the ready list. Needs why.",
2999 "True when no pillar: opens behind the Later gate. Needs why.",
30003000 },
30013001 why: {
30023002 type: "string",
30033003 description:
3004 "With later: one sentence saying why it waits. It opens the issue's body.",
3004 "With later: one sentence why.",
30053005 },
30063006 },
30073007 required: ["key", "title"],
@@ -3046,7 +3046,7 @@ const TOOLS: readonly Tool[] = [
30463046 {
30473047 name: "access",
30483048 description:
3049 "What outside agents tried: the forge's own request log, redacted, for a forge admin. Non-browser requests to public paths (/issues, /api/, /mcp, /.well-known/, /llms.txt, sign-in, sign-up), newest first, at most 500: time, host, method, path without query, status, duration in ms, user agent, whether a credential came with it, and a daily hash of the caller (never an address). `since` is an ISO time (the last day when absent; at most 14 days back), `ua` a part of the user agent, `path` the start of the path. Needs a write-scope token. The same as Settings → Access.",
3049 "What outside agents tried: the redacted log of non-browser requests to public paths, newest first, at most 500, for a forge admin.",
30503050 inputSchema: {
30513051 type: "object",
30523052 properties: {
@@ -3074,7 +3074,7 @@ const TOOLS: readonly Tool[] = [
30743074 {
30753075 name: "capacity",
30763076 description:
3077 "The forge's capacity and guards, live: crew runs at once (crew.concurrency), checks at once (checks.concurrency), test shards per check (checks.shards), whether a cell's undeclared egress is refused or reported (cells.egress), and whether new accounts may create repositories and forks (guard_new_accounts: on refuses accounts younger than 7 days, off is the default), and whether the platform edge's sign-in is read (signin.edge: on is the default, off ignores the edge's identity on every door). Without `key`, each setting, its value and where it comes from, and the recent changes. With `key` and `value` (\"\" goes back to the boot default), the change it would make; with dryRun false, made, by a forge admin with an admin-scope token, never an agent. A change is honoured by the next run, check or cell, never by a restart. The same as Settings → Capacity and /api/v1/admin/capacity.",
3077 "The forge's capacity and guards, live. With `key` and `value` (\"\" restores default), plans; dryRun false makes it.",
30783078 inputSchema: {
30793079 type: "object",
30803080 properties: {
@@ -3083,7 +3083,7 @@ const TOOLS: readonly Tool[] = [
30833083 enum: ["crew.concurrency", "checks.concurrency", "checks.shards", "cells.egress", "guard_new_accounts", "signin.edge"],
30843084 },
30853085 value: { type: "string", maxLength: 16 },
3086 dryRun: { type: "boolean", description: "Plan only (the default). Send false to change it." },
3086 dryRun: { type: "boolean", description: "false to apply (default plans)." },
30873087 },
30883088 },
30893089 writes: true,
@@ -3113,7 +3113,7 @@ const TOOLS: readonly Tool[] = [
31133113 {
31143114 name: "scorecard",
31153115 description:
3116 "The crew's scorecard, for a forge admin: per agent (username), its figures over all time (`all`) and the last 30 days (`recent`) — pulls opened and landed, mean review rounds, red check rate, reverts, mean ms to land (a ratio over nothing is null) — and `splits` by model and prompt. Read-only. The same as /settings/crew and /api/v1/crew/scorecard.",
3116 "The crew's scorecard for a forge admin: per agent, over all time and 30 days (pulls landed, review rounds, red check rate, reverts), by model and prompt.",
31173117 inputSchema: { type: "object", properties: {} },
31183118 writes: false,
31193119 adminOnly: true,
@@ -3125,7 +3125,7 @@ const TOOLS: readonly Tool[] = [
31253125 {
31263126 name: "flow",
31273127 description:
3128 "The forge's pipeline, for a forge admin: ready, building, check queue, checking, review, approved, landed and live, each with how many wait, how many are being worked, when the oldest waiting one entered (oldestWaiting) and what limits it (capacity), and one sentence (says) naming the stage whose oldest has waited longest — the bottleneck. Beside it, throughput: per stage how many left it in the last hour (lastHour), in 24 hours (day) and in each of the last 24 hours (hours, 0 the last), the median ask→live in ms over the last 24 hours, and its own sentence (says). Also `conflicted`: pulls main moved under that the crew is bringing up to date, oldest first, with a sentence (says). And `requested`: open crew pulls whose reviewer last asked for changes, split into those waiting on a builder (builder: the verdict is on the head) and on a reviewer (reviewer: a push came since), each oldest first with a sentence (says). And the merge queue (queue): per repository (repo), the pulls queued for the next candidate (queued), the pulls in the candidate at the gate (gating) and the pulls landed in the last hour (landedHour). Read-only; the knobs are the `capacity` tool. The same as the flow panel on /boards.",
3128 "The forge's pipeline for a forge admin: per stage counts, `oldestWaiting`, `capacity`, `says` naming the bottleneck, merge `queue`.",
31293129 inputSchema: { type: "object", properties: {} },
31303130 writes: false,
31313131 run(ctx, user) {
@@ -3139,7 +3139,7 @@ const TOOLS: readonly Tool[] = [
31393139 {
31403140 name: "system",
31413141 description:
3142 "The machine the forge runs on, now: per-core CPU, temperatures, load, memory, disk per mount, network, and every process grouped by what launched it (which check, which app), each group with CPU cores, memory and age; and the test files running in more than one check at once (duplicates). For a forge admin, or an agent granted telemetry:read — whose view cuts out private repositories' checks and apps. Read-only; the same as /system and /api/v1/telemetry/system.",
3142 "The machine the forge runs on, now: CPU, load, memory, disk, network, processes. Forge admin or telemetry:read.",
31433143 inputSchema: { type: "object", properties: {} },
31443144 writes: false,
31453145 run(ctx, user) {
@@ -3153,7 +3153,7 @@ const TOOLS: readonly Tool[] = [
31533153 {
31543154 name: "contribute",
31553155 description:
3156 "For any agent that arrives: what this forge is, where its bottleneck is right now, the open issues in public repositories labelled “help wanted” that welcome outside work, and how to propose (fork, pull, the gate it must pass). Open to every caller.",
3156 "For any agent that arrives: what this forge is, its bottleneck, open “help wanted” issues in public repositories, and how to propose.",
31573157 inputSchema: { type: "object", properties: {} },
31583158 writes: false,
31593159 run: (ctx) => good(welcome(ctx.app)),
@@ -3161,13 +3161,13 @@ const TOOLS: readonly Tool[] = [
31613161 {
31623162 name: "limits",
31633163 description:
3164 "Every limit the forge's owner can hit, with its value, bounds and the reason it is there (people per app, pins, hidden repositories, budget ceilings, daily shares, sign-in attempts, crew and check concurrency). Without `key`, each limit and the recent changes. With `key` and `value` (\"\" goes back to the default), the change it would make; with dryRun false, made, by a forge admin with an admin-scope token, never an agent. Honoured by the next use, never by a restart. The same as /admin/limits and /api/v1/admin/limits.",
3164 "Every limit the forge's owner can hit, with value, bounds and reason. With `key` and `value` (\"\" restores default), plans.",
31653165 inputSchema: {
31663166 type: "object",
31673167 properties: {
31683168 key: { type: "string", enum: [...LIMIT_KEYS] },
31693169 value: { type: "string", maxLength: 16 },
3170 dryRun: { type: "boolean", description: "Plan only (the default). Send false to change it." },
3170 dryRun: { type: "boolean", description: "false to apply (default plans)." },
31713171 },
31723172 },
31733173 writes: true,
@@ -3197,7 +3197,7 @@ const TOOLS: readonly Tool[] = [
31973197 {
31983198 name: "teams",
31993199 description:
3200 "Crew teams, for a forge admin who is a person: each team's charter, dial (its share, a whole number from 0 to 100; all dials together may not pass 100) and member agents. Without `slug`, the teams. With `slug` and any of `charter`, `dial`, `members` (agent ids; replaces the list), the change it would make; with dryRun false, made, with an admin-scope token. Nothing reads the dials yet. The same as /settings/teams and /api/v1/admin/teams.",
3200 "Crew teams for a forge admin who is a person: charter, dial (0–100) and member agents.",
32013201 inputSchema: {
32023202 type: "object",
32033203 properties: {
@@ -3205,7 +3205,7 @@ const TOOLS: readonly Tool[] = [
32053205 charter: { type: "string", maxLength: 2000 },
32063206 dial: { type: "integer", minimum: 0, maximum: 100 },
32073207 members: { type: "array", maxItems: 500, items: { type: "string", maxLength: 64 } },
3208 dryRun: { type: "boolean", description: "Plan only (the default). Send false to change it." },
3208 dryRun: { type: "boolean", description: "false to apply (default plans)." },
32093209 },
32103210 },
32113211 writes: true,
@@ -3247,7 +3247,7 @@ const TOOLS: readonly Tool[] = [
32473247 {
32483248 name: "cloud_accounts",
32493249 description:
3250 "Cloud accounts, for a forge admin: each attached provider token (github, cloudflare, vercel) with what it is used for, when it was verified and last used, whether runs may write with it, and today's vendor calls (UTC day) — then every audit row of today, newest first. Never a token value. Needs a write-scope token. The same as Settings → Cloud accounts.",
3250 "Cloud accounts for a forge admin: each attached provider token with use, verification, write permission and today's vendor calls.",
32513251 inputSchema: { type: "object", properties: {} },
32523252 // A read, but marked a write so a `ro` token never lists the accounts; it
32533253 // is a forge admin's and the audit rows name every vendor call.
@@ -3263,7 +3263,7 @@ const TOOLS: readonly Tool[] = [
32633263 {
32643264 name: "cloud_account",
32653265 description:
3266 "Change a cloud account, as a forge admin with an admin-scope token. `verb` is attach (checks `value` with the provider's read-only calls, then seals it), verify (re-checks the sealed token), rotate (checks a new `value`, then replaces it), rename (to `to`; refused when the account or the secret CLOUD_<PROVIDER>_<NAME> already exists), remove, allow_writes (`allowed` true or false: whether a run that declares writes may hold the token) or audit (a read-only vendor audit, one issue per finding in `repo`). `provider` is github, cloudflare or vercel; `name` is lowercase letters, digits and underscores. The answer never contains the token. The same as Settings → Cloud accounts.",
3266 "Change a cloud account (forge admin, admin-scope token). `verb`: attach, verify, rotate, rename, remove, allow_writes or audit. Never returns the token.",
32673267 inputSchema: {
32683268 type: "object",
32693269 properties: {
@@ -3318,13 +3318,13 @@ const TOOLS: readonly Tool[] = [
33183318 {
33193319 name: "quotas",
33203320 description:
3321 "What one account may own: per-account quotas for repositories and apps, each a positive whole number or no limit (null, the default). Nothing enforces them yet. Without `key`, each quota and the recent changes. With `key` and `value` (\"\" clears it), the change it would make; with dryRun false, made, by a forge admin with an admin-scope token, never an agent. The same as /admin/limits (Account quotas) and /api/v1/admin/settings.",
3321 "Per-account quotas for repositories and apps (a number, or null; not enforced yet). With `key` and `value` (\"\" clears), plans; dryRun false makes it.",
33223322 inputSchema: {
33233323 type: "object",
33243324 properties: {
33253325 key: { type: "string", enum: [...QUOTA_KEYS] },
33263326 value: { type: "string", maxLength: 16 },
3327 dryRun: { type: "boolean", description: "Plan only (the default). Send false to change it." },
3327 dryRun: { type: "boolean", description: "false to apply (default plans)." },
33283328 },
33293329 },
33303330 writes: true,
@@ -3356,12 +3356,12 @@ const TOOLS: readonly Tool[] = [
33563356 {
33573357 name: "signup",
33583358 description:
3359 "Who may sign up: open, invite or closed (default open). open lets anyone make an account; invite lets in only a person with an open invite link (mint_invite), spent with the account; closed refuses every new account. The forge's first account is never refused. Without `mode`, the setting and the recent changes. With `mode`, the change it would make; with dryRun false, made, by a forge admin with an admin-scope token, never an agent. The same as /admin/limits (Signup) and PATCH /api/v1/admin/settings.",
3359 "Who may sign up: open (default); invite lets in only a person with an open invite link; closed refuses every new account. With `mode`, plans.",
33603360 inputSchema: {
33613361 type: "object",
33623362 properties: {
33633363 mode: { type: "string", enum: [...SIGNUP_MODES] },
3364 dryRun: { type: "boolean", description: "Plan only (the default). Send false to change it." },
3364 dryRun: { type: "boolean", description: "false to apply (default plans)." },
33653365 },
33663366 },
33673367 writes: true,
@@ -3389,7 +3389,7 @@ const TOOLS: readonly Tool[] = [
33893389 {
33903390 name: "boards",
33913391 description:
3392 "The forge's boards, for a forge admin who is a person (an agent is refused): each board's slug, title, range, refresh and panels. The same as /boards and GET /api/v1/boards. With `slug`, that one board. With `slug` and `panel` (its place from 0), that panel's data: {from, to, step, rows}, bucketed to `step` (300, 5m, 1h, 1d) or one the panel picks, never cut short; `from` and `to` (dates) stand in for the panel's. The same as GET /api/v1/boards/:slug/panels/:id.",
3392 "The forge's boards for a forge admin who is a person: slug, title, range, refresh and panels.",
33933393 inputSchema: {
33943394 type: "object",
33953395 properties: {
@@ -3431,7 +3431,7 @@ const TOOLS: readonly Tool[] = [
34313431 {
34323432 name: "board_write",
34333433 description:
3434 "Write a whole board under a slug (a-z, 0-9 and -): made if new, replaced if there. `board` is {title, range: 1h|24h|7d|30d|all, refresh: off|10s|1m, panels: [{title, chart: line|bar|area|number|table|heat, query, w, h}]}. A panel whose query cannot run is refused. For a forge admin who is a person; an agent is refused. The same as PUT /api/v1/boards/:slug.",
3434 "Write a whole board under a slug (made or replaced). `board` is {title, range, refresh, panels: [{title, chart, query, w, h}]}.",
34353435 inputSchema: {
34363436 type: "object",
34373437 properties: {
@@ -3450,7 +3450,7 @@ const TOOLS: readonly Tool[] = [
34503450 {
34513451 name: "board_pins",
34523452 description:
3453 "The panels pinned to the caller's own home, for a forge admin who is a person (an agent is refused). With no `op`, lists them in order. With `op` pin, unpin or move, changes them: `slug` and `title` name a panel of a board; `by` is -1 or 1 for move. The same as GET and POST /api/v1/boards/pins.",
3453 "The panels pinned to the caller's home, for a forge admin who is a person. No `op` lists them.",
34543454 inputSchema: {
34553455 type: "object",
34563456 properties: {
@@ -3481,7 +3481,7 @@ const TOOLS: readonly Tool[] = [
34813481 {
34823482 name: "board_delete",
34833483 description:
3484 "Delete a board by slug (the commit stays in the boards repo's history). For a forge admin who is a person; an agent is refused. The same as DELETE /api/v1/boards/:slug.",
3484 "Delete a board by slug (history keeps it). Forge admin who is a person, not an agent.",
34853485 inputSchema: {
34863486 type: "object",
34873487 properties: { slug: { type: "string", maxLength: 40 } },
@@ -3636,7 +3636,7 @@ function rpcOne(
36363636 const REPORT_TOOL = {
36373637 name: "report",
36383638 description:
3639 "Report a problem in a public repository, without an account. Plain text. A person who keeps the repository reads it before anything acts on it.",
3639 "Report a problem in a public repository, without an account. Plain text; a person reads it first.",
36403640 inputSchema: {
36413641 type: "object",
36423642 properties: {
test/mcp-size.test.ts added +72
@@ -0,0 +1,72 @@
1 /**
2 * Every harness session pays for `tools/list` before it does anything, so
3 * the answer has a ceiling: past it, the longest descriptions are named so
4 * the next cut is obvious.
5 */
6 import { afterAll, beforeAll, expect, test } from "bun:test";
7 import { mkdtemp, rm } from "node:fs/promises";
8 import { tmpdir } from "node:os";
9 import { join } from "node:path";
10 import { createApp, type App } from "../src/app.ts";
11 import { createToken } from "../src/core/tokens.ts";
12 import { createUser } from "../src/core/users.ts";
13 import { serve, type Servers } from "../src/http/server.ts";
14
15 const CEILING = 40_000;
16
17 let dataDir: string;
18 let app: App;
19 let servers: Servers;
20 let token: string;
21
22 beforeAll(async () => {
23 dataDir = await mkdtemp(join(tmpdir(), "forge-mcp-size-"));
24 app = createApp({ dataDir, port: 0 });
25 servers = await serve(app);
26 // The first user is a forge admin, who is listed every tool: the largest answer.
27 const made = await createUser(app.db, {
28 origin: "seed",
29 trusted: true,
30 username: "alice",
31 email: "[email protected]",
32 password: "a-good-passphrase",
33 adminIfFirst: true,
34 });
35 if (!made.ok) throw new Error(made.error);
36 token = createToken(app.db, made.value.id, "rw", "rw").token;
37 }, 30_000);
38
39 afterAll(async () => {
40 servers.stop();
41 app.close();
42 await rm(dataDir, { recursive: true, force: true });
43 });
44
45 test("tools/list stays under 40 KB", async () => {
46 const res = await fetch(`${servers.url}/mcp`, {
47 method: "POST",
48 headers: {
49 "content-type": "application/json",
50 accept: "application/json, text/event-stream",
51 authorization: `Bearer ${token}`,
52 },
53 body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/list" }),
54 });
55 const text = await res.text();
56 const bytes = Buffer.byteLength(text);
57 const tools = (JSON.parse(text) as any).result.tools as {
58 name: string;
59 description: string;
60 }[];
61 const longest = tools
62 .map((t) => `${t.name} (${Buffer.byteLength(t.description)} bytes)`)
63 .sort(
64 (a, b) =>
65 Number(/\((\d+) /.exec(b)![1]) - Number(/\((\d+) /.exec(a)![1]),
66 )
67 .slice(0, 5);
68 expect(
69 bytes,
70 `tools/list is ${bytes} bytes, over ${CEILING}; the five longest descriptions: ${longest.join(", ")}`,
71 ).toBeLessThanOrEqual(CEILING);
72 });

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs