@longbook/mcp 1.40.2 → 1.40.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -1
- package/bin/longbook-mcp.mjs +27 -26
- package/package.json +3 -3
- package/server.json +2 -2
package/README.md
CHANGED
|
@@ -121,11 +121,22 @@ connection as resources, and four self-contained HTML cards render the answers.
|
|
|
121
121
|
All read tools declare `readOnlyHint`; nothing here can change your files except
|
|
122
122
|
the two review-gated local write tools described above.
|
|
123
123
|
|
|
124
|
+
## More about longbook
|
|
125
|
+
|
|
126
|
+
- [longbook.app](https://longbook.app/): the app for Mac and iPhone
|
|
127
|
+
- [This package on longbook.app](https://longbook.app/features/longbook-npm-package/)
|
|
128
|
+
- [Every feature](https://longbook.app/features/) and [automations with your AI](https://longbook.app/automations/)
|
|
129
|
+
- [Automate longbook with Claude](https://longbook.app/features/automate-longbook-with-claude/)
|
|
130
|
+
- [Review every change your AI makes](https://longbook.app/features/review-every-change-your-ai-makes/)
|
|
131
|
+
- [Get insights about your expenses from your AI](https://longbook.app/features/get-insights-about-your-expenses-from-your-ai/)
|
|
132
|
+
- [Import your bank statements](https://longbook.app/features/import-your-bank-statements/)
|
|
133
|
+
- [Why we built longbook](https://longbook.app/why-we-built-longbook/) and the [FAQ](https://longbook.app/faq/)
|
|
134
|
+
|
|
124
135
|
## Privacy
|
|
125
136
|
|
|
126
137
|
The memory's format cannot hold card numbers, CVVs, expiries, PINs, or credentials —
|
|
127
138
|
there is no field for them, and a save containing one is refused. The privacy policy
|
|
128
|
-
is at [longbook.app/privacy-policy](https://longbook.app/privacy-policy).
|
|
139
|
+
is at [longbook.app/privacy-policy](https://longbook.app/privacy-policy/).
|
|
129
140
|
|
|
130
141
|
## License
|
|
131
142
|
|
package/bin/longbook-mcp.mjs
CHANGED
|
@@ -6179,7 +6179,7 @@ second beside it. Optional; a vault without this array has nothing planned and n
|
|
|
6179
6179
|
}
|
|
6180
6180
|
]
|
|
6181
6181
|
}
|
|
6182
|
-
`;var l0="1.40.
|
|
6182
|
+
`;var l0="1.40.4";var wa=[{id:"set-up-my-longbook",title:"Set up my longbook",group:"setup",phrases:["Read my 12-month bank statement and help me set up my longbook","Set up my longbook"],aliases:["Read my 12-months bank statement along with my onboarding info and help me set up my longbook using longbook's connector and longbook.app/mcp","Read my bank statement and set up my longbook","Setup my longbook"],attachments:"bank and card statements, ideally the last 12 months, as a PDF with text, an .xlsx or a CSV. Ca\
|
|
6183
6183
|
rd statements matter too: a bank statement shows only the card bill payment, not what the card was spent on.",result:"Your longbook filled from your statements: every charge on record, the names you picked in setup filled in where your statements or your answers show them, each account's closing balance set, the charges that clearly repeat planned ahead, and the rest set to repeat once you confirm them. It waits in the Changes screen for you to keep.",writes:!0,chapter:"first-run",procedure:["1.\
|
|
6184
6184
|
Check that you are allowed to write to the user's longbook. If not, tell the user which setting to switch on, and stop.","2. Read the user's statements in the chat. Through the Mac connection, also read the ones in the longbook documents folder. If there are none, ask the user to attach them, and stop. If only bank statements came, ask for the card statements too.","3. Before reading a line, say which account and which days each statement covers, and today's date.","4. Read what the user's long\
|
|
6185
6185
|
book already holds: members, accounts, commitments, charges, categories, and the names still waiting to be filled in from setup. Know what longbook can hold for each commitment, charge, member and account before you write. Reports are not among them: longbook draws them itself.",'5. Look for the waiting names in the statements first, loosely. A transfer to a person on the 1st of every month could be a salary; a premium line to an insurer could be a health insurance. Record each one under exactly\
|
|
@@ -6781,29 +6781,30 @@ r,null,2)),tie(l,hI(i,o))}catch(c){throw nie(l,{force:!0}),c}return{asked:s.payl
|
|
|
6781
6781
|
Error?b.message:String(b)}],isError:!0}}};s("next_payment",{...Ya("next_payment")},()=>a(()=>sw(t.load()))),s("upcoming",{...Ya("upcoming"),inputSchema:Q.object({days:Q.number().int().min(1).max(365).default(30)}).default({})},({days:w})=>a(()=>aw(t.load(),w))),s("cashflow",{...Ya("cashflow"),inputSchema:Q.object({currency:Q.string().trim().toUpperCase().length(3).optional(),months_back:Q.number().int().min(0).max(24).default(0),months_forward:Q.number().int().min(0).max(24).default(12)}).default(
|
|
6782
6782
|
{})},({currency:w,months_back:b,months_forward:y})=>a(()=>rw(t.load(),b,y,w))),s("spending_by_category",{...Ya("spending_by_category"),inputSchema:Q.object({from:Q.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),to:Q.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional()}).default({})},({from:w,to:b})=>a(()=>m6(t.load(),w,b))),s("spending_by_account",{...Ya("spending_by_account"),inputSchema:Q.object({from:Q.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),to:Q.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional()}).
|
|
6783
6783
|
default({})},({from:w,to:b})=>a(()=>p6(t.load(),w,b))),s("spending_by_member",{...Ya("spending_by_member"),inputSchema:Q.object({from:Q.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),to:Q.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional()}).default({})},({from:w,to:b})=>a(()=>g6(t.load(),w,b))),s("charges",{...Ya("charges"),inputSchema:Q.object({id:Q.string().optional(),name:Q.string().optional(),from:Q.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),to:Q.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),
|
|
6784
|
-
paid:Q.boolean().optional()}).default({})},w=>a(()=>d6(t.load(),w))),s("commitments",{...Ya("commitments"),inputSchema:Q.object({status:Q.enum(["active","paused","cancelled","all"]).default("active")}).default({})},({status:w})=>a(()=>iw(t.load(),w))),s("search",{...Ya("search"),inputSchema:Q.object({query:Q.string().trim().min(1)})},({query:w})=>a(()=>w6(t.load(),w)));let r=new Set(["longbook-phone","longbook-mac","longbook-ios"]),i=()=>{let w=(n.server.getClientVersion()?.name??"").trim().
|
|
6785
|
-
return!w||r.has(
|
|
6786
|
-
optional().describe("How many charges to write for a recurring commitment, counted from first_charge \u2014 240 at most. When given, plan_months is not read."),ends_on:o.optional(),status:Q.enum(["active","paused","cancelled"]).optional(),paid:Q.boolean().optional(),paid_on:o.optional(),basis:Q.enum(["statement",
|
|
6787
|
-
describe(cl),member:Q.string().optional(),account:Q.string().optional()}).passthrough(),d=o.nullable().optional().describe("The day the money moved, when it was not the due date. Null clears."),f=Q.string().max(300).nullable().optional().describe("A word about this one charge. Null clears.");s("
|
|
6788
|
-
optional(),source:l,set:Q.object({name:Q.string().trim().min(1).optional(),amount:c.optional(),from:o.optional(),date:o.optional(),currency:Q.string().trim().regex(/^[A-Za-z]{3}$/).optional(),billing_cycle:Q.enum(["monthly","yearly","custom","once"]).optional(),custom_cycle_days:h.nullable().optional(),
|
|
6789
|
-
a charge.`),tag:Q.string().nullable().optional(),notes:Q.string().nullable().optional().describe(`${cl} Rewritten as the commitment now stands, never appended to.`),member:Q.string().nullable().optional(),account:Q.string().nullable().optional(),free_trial:Q.boolean().optional().describe(A0)}).passthrough()})},
|
|
6790
|
-
note:f,source:l})},w=>a(()=>gN(t.dir,i(),w))),s("add_charges",{...I0,inputSchema:Q.object({id:Q.string().optional(),name:Q.string().optional(),charges:Q.array(Q.object({date:o,amount:c.optional(),paid:Q.boolean().optional(),paid_on:d,basis:Q.enum(["statement","user","email","plan","mark_paid"]).optional(),note:f,
|
|
6791
|
-
name:Q.string().optional(),date:o.describe("The day the charge sits on."),set:Q.object({date:o.optional().describe("The day to move it to. A day that already holds a charge is refused."),amount:c.optional(),paid:Q.boolean().optional(),paid_on:d,note:f,and_later:Q.boolean().optional().describe("Reach the
|
|
6792
|
-
|
|
6793
|
-
1)).min(1).max(200),billing_cycle:Q.enum(["monthly","yearly","custom"]),custom_cycle_days:h.optional(),plan_months:Q.number().int().min(1).max(600).optional(),ends_on:o.optional(),name:Q.string().trim().min(1).optional(),tag:Q.string().nullable().optional(),member:Q.string().nullable().optional(),account:Q.string().
|
|
6794
|
-
min(1).optional()}).default({})},w=>a(()=>HN(t.dir,w))),s("list_documents",{...F$},()=>a(()=>H$(t.dir))),s("read_document",{...z$,inputSchema:Q.object({name:Q.string().trim().min(1),offset:Q.number().int().nonnegative().optional()})},async w=>{try{let b=await U$(t.dir,w);return{content:[{type:"text",text:JSON.
|
|
6795
|
-
min(1),text:Q.string().trim().min(1)})},w=>a(()=>W$(t.dir,w))),s("cancel_commitment",{...P0,inputSchema:Q.object({id:Q.string().optional(),name:Q.string().optional(),source:l}).default({})},w=>a(()=>vN(t.dir,i(),w))),s("update_account",{...D0,inputSchema:Q.object({id:Q.string().optional(),name:Q.string().
|
|
6796
|
-
linked_to:Q.string().nullable().optional().describe("The account this one is linked to \u2014 a card to the bank account that pays it \u2014 by name or id. One level only. Null clears."),parent:Q.string().nullable().optional().describe("An older name for linked_to, still accepted."),parent_account:Q.
|
|
6797
|
-
|
|
6798
|
-
dir,i(),w))),s("add_member",{...z0,inputSchema:Q.object({name:Q.string().trim().min(1).describe("The name, as the owner said it. Refused when another person already wears it."),tag:Q.string().optional().describe("Their role in the owner's finances \u2014 a member tag: family, household help, landlord."),email:Q.
|
|
6799
|
-
min(1).describe('The display name \u2014 "Visa 9292", the last four digits at most. Refused when another account already wears it.'),tag:Q.string().optional().describe(`The account type, in the app's own words \u2014 "credit card", "bank account", "UPI", "wallet", "cash".`),linked_to:Q.string().optional().describe(
|
|
6800
|
-
belongs to, by name or id as the memory holds them."),notes:Q.string().optional().describe(au),balance:Q.number().finite().optional().describe("What the account held on balance_date."),balance_date:o.optional().describe("The day the balance was true. Left out beside a balance, the day of the write is used."),source:l}).
|
|
6801
|
-
|
|
6802
|
-
commitments or search. By id only, never by name."),source:l})},w=>a(()=>jN(t.dir,i(),w)));let m=w=>Q.array(Q.string()).nullish().describe(`${w}, each by name as the memory holds it. Left out or empty: all of them.`);s("create_report",{...W0,inputSchema:Q.object({title:Q.string().describe(U0),start_date:Q.string().
|
|
6803
|
-
'The categories the report covers, or "No category" for untagged charges'),source:l}).passthrough()},w=>a(()=>Z$(t.dir,i(),w))),s("read_guide",{...Ya("read_guide"),inputSchema:Q.object({section:Q.string().optional()}).default({})},w=>a(()=>eN(t.readContractFile(cu),w.section))),s("tags",{...Ya("tags")},()=>a(
|
|
6804
|
-
readContractFile(cu),schemaText:()=>t.readContractFile(Bf),writeMode:"direct",identity:()=>({server:"longbook (this Mac)",vault:t.dir,connected_as:i(),writes:"straight to the folder \u2014 every batch lands in the app's Changes screen for review"})})));for(let w of Rf){let b=y=>{let v=v0(w.name,y);
|
|
6805
|
-
_4)}},({month:y})=>b(y)):n.registerPrompt(w.name,{title:w.title,description:w.description},()=>b())}n.server.setRequestHandler(Th,w=>{let b=v0(w.params.name,w.params.arguments?.month,new Date,y=>y.getMonth());if(!b)throw new Ke(at.InvalidParams,`No prompt named ${w.params.name}. Prompts: ${Rf.map(y=>y.
|
|
6806
|
-
|
|
6807
|
-
uri:w.href,mimeType:ol.mimeType,text:t.readContractFile(_6)}]}));let g=[["ui://longbook/next-payment.html",()=>p0(sw(t.load()))],["ui://longbook/upcoming.html",()=>g0(aw(t.load(),30))],["ui://longbook/cashflow.html",()=>w0(rw(t.load(),0,12))],["ui://longbook/commitments.html",()=>b0(iw(t.load(),"
|
|
6808
|
-
v=>{let k;try{k=b()}catch(j){k=tu(j instanceof Error?j.message:String(j))}return{contents:[{uri:v.href,mimeType:y.mimeType,text:k}]}})}return n}async function hie(){let t;try{t=new lu(aN())}catch(e){console.error(e instanceof Error?e.message:String(e)),process.exit(1)}try{t.load()}catch(e){console.
|
|
6784
|
+
paid:Q.boolean().optional()}).default({})},w=>a(()=>d6(t.load(),w))),s("commitments",{...Ya("commitments"),inputSchema:Q.object({status:Q.enum(["active","paused","cancelled","all"]).default("active")}).default({})},({status:w})=>a(()=>iw(t.load(),w))),s("search",{...Ya("search"),inputSchema:Q.object({query:Q.string().trim().min(1)})},({query:w})=>a(()=>w6(t.load(),w)));let r=new Set(["longbook-phone","longbook-mac","longbook-ios"]),i=()=>{let w=(n.server.getClientVersion()?.name??"").trim(),b=w.
|
|
6785
|
+
toLowerCase();return!w||r.has(b)?"mcp":b.includes("claude")||b.includes("anthropic")?"Claude":b.includes("chatgpt")||b.includes("openai")?"ChatGPT":b.includes("gemini")?"Gemini":b.includes("cursor")?"Cursor":w},o=Q.string().regex(/^\d{4}-\d{2}-\d{2}$/),l=Q.string().trim().min(1).max(200).optional(),c=Q.number().describe(R4),h=Q.number().describe(P4),u=Q.object({name:Q.string().trim().min(1),amount:c,currency:Q.string().trim().regex(/^[A-Za-z]{3}$/),billing_cycle:Q.enum(["monthly","yearly","custo\
|
|
6786
|
+
m","once"]),custom_cycle_days:h.optional(),first_charge:o.optional(),date:o.optional(),plan_months:Q.number().int().min(1).max(600).optional(),plan_count:Q.number().int().min(1).max(ji).optional().describe("How many charges to write for a recurring commitment, counted from first_charge \u2014 240 at most. When given, plan_months is not read."),ends_on:o.optional(),status:Q.enum(["active","paused","cancelled"]).optional(),paid:Q.boolean().optional(),paid_on:o.optional(),basis:Q.enum(["statement",
|
|
6787
|
+
"user","email","plan"]).optional(),direction:Q.enum(["in","out","transfer"]).optional().describe(ru),note:Q.string().max(300).optional(),tag:Q.string().optional(),notes:Q.string().optional().describe(cl),member:Q.string().optional(),account:Q.string().optional()}).passthrough(),d=o.nullable().optional().describe("The day the money moved, when it was not the due date. Null clears."),f=Q.string().max(300).nullable().optional().describe("A word about this one charge. Null clears.");s("add_commitmen\
|
|
6788
|
+
ts",{...q0,inputSchema:Q.object({rows:Q.array(u).min(1).max(200),source:l})},w=>a(()=>mN(t.dir,i(),w))),s("update_commitment",{...C0,inputSchema:Q.object({id:Q.string().optional(),name:Q.string().optional(),source:l,set:Q.object({name:Q.string().trim().min(1).optional(),amount:c.optional(),from:o.optional(),date:o.optional(),currency:Q.string().trim().regex(/^[A-Za-z]{3}$/).optional(),billing_cycle:Q.enum(["monthly","yearly","custom","once"]).optional(),custom_cycle_days:h.nullable().optional(),
|
|
6789
|
+
ends_on:o.nullable().optional(),status:Q.enum(["active","paused","cancelled"]).optional(),direction:Q.enum(["in","out","transfer"]).nullable().optional().describe(`${ru} Null, like "out", makes it a charge.`),tag:Q.string().nullable().optional(),notes:Q.string().nullable().optional().describe(`${cl} Rewritten as the commitment now stands, never appended to.`),member:Q.string().nullable().optional(),account:Q.string().nullable().optional(),free_trial:Q.boolean().optional().describe(A0)}).passthrough()})},
|
|
6790
|
+
w=>a(()=>pN(t.dir,i(),w))),s("mark_paid",{...T0,inputSchema:Q.object({id:Q.string().optional(),name:Q.string().optional(),date:o,paid:Q.boolean().default(!0),amount:c.optional(),paid_on:d,note:f,source:l})},w=>a(()=>gN(t.dir,i(),w))),s("add_charges",{...I0,inputSchema:Q.object({id:Q.string().optional(),name:Q.string().optional(),charges:Q.array(Q.object({date:o,amount:c.optional(),paid:Q.boolean().optional(),paid_on:d,basis:Q.enum(["statement","user","email","plan","mark_paid"]).optional(),note:f,
|
|
6791
|
+
currency:Q.string().trim().regex(/^[A-Za-z]{3}$/).optional()})).min(1).max(600),source:l})},w=>a(()=>wN(t.dir,i(),w))),s("update_charge",{...N0,inputSchema:Q.object({id:Q.string().optional(),name:Q.string().optional(),date:o.describe("The day the charge sits on."),set:Q.object({date:o.optional().describe("The day to move it to. A day that already holds a charge is refused."),amount:c.optional(),paid:Q.boolean().optional(),paid_on:d,note:f,and_later:Q.boolean().optional().describe("Reach the unpa\
|
|
6792
|
+
id planned rows after it: they follow a move a cycle apart, keeping their amounts, and take a new amount with the commitment's price.")}).passthrough(),source:l})},w=>a(()=>kN(t.dir,i(),w))),s("set_planned_count",{...F0,inputSchema:Q.object({id:Q.string().optional(),name:Q.string().optional(),count:Q.number().int().min(1).max(ji).describe("How many charges stand from today on. 240 at most."),source:l})},w=>a(()=>xN(t.dir,i(),w))),s("remove_charges",{...R0,inputSchema:Q.object({id:Q.string().optional(),
|
|
6793
|
+
name:Q.string().optional(),dates:Q.array(o).min(1).max(600),source:l})},w=>a(()=>bN(t.dir,i(),w))),s("promote_to_recurring",{...E0,inputSchema:Q.object({ids:Q.array(Q.string().trim().min(1)).min(1).max(200),billing_cycle:Q.enum(["monthly","yearly","custom"]),custom_cycle_days:h.optional(),plan_months:Q.number().int().min(1).max(600).optional(),ends_on:o.optional(),name:Q.string().trim().min(1).optional(),tag:Q.string().nullable().optional(),member:Q.string().nullable().optional(),account:Q.string().
|
|
6794
|
+
nullable().optional(),notes:Q.string().nullable().optional().describe(cl),source:l}).passthrough()},w=>a(()=>yN(t.dir,i(),w))),s("reports",{...FN,inputSchema:Q.object({id:Q.string().trim().min(1).optional()}).default({})},w=>a(()=>HN(t.dir,w))),s("list_documents",{...F$},()=>a(()=>H$(t.dir))),s("read_document",{...z$,inputSchema:Q.object({name:Q.string().trim().min(1),offset:Q.number().int().nonnegative().optional()})},async w=>{try{let b=await U$(t.dir,w);return{content:[{type:"text",text:JSON.
|
|
6795
|
+
stringify(b,null,2)}]}}catch(b){return{content:[{type:"text",text:b instanceof Error?b.message:String(b)}],isError:!0}}}),s("leave_insight",{...M0,inputSchema:Q.object({module:Q.string().trim().min(1),text:Q.string().trim().min(1)})},w=>a(()=>W$(t.dir,w))),s("cancel_commitment",{...P0,inputSchema:Q.object({id:Q.string().optional(),name:Q.string().optional(),source:l}).default({})},w=>a(()=>vN(t.dir,i(),w))),s("update_account",{...D0,inputSchema:Q.object({id:Q.string().optional(),name:Q.string().
|
|
6796
|
+
optional(),source:l,set:Q.object({name:Q.string().trim().min(1).optional(),tag:Q.string().nullable().optional(),balance:Q.number().finite().nullable().optional(),balance_date:o.nullable().optional(),linked_to:Q.string().nullable().optional().describe("The account this one is linked to \u2014 a card to the bank account that pays it \u2014 by name or id. One level only. Null clears."),parent:Q.string().nullable().optional().describe("An older name for linked_to, still accepted."),parent_account:Q.
|
|
6797
|
+
string().nullable().optional().describe("An older name for linked_to, still accepted."),notes:Q.string().nullable().optional().describe(au),member:Q.string().nullable().optional().describe('The person the account belongs to, by name or id. Null or "" clears.')}).passthrough()})},w=>a(()=>qN(t.dir,i(),w))),s("update_member",{...O0,inputSchema:Q.object({id:Q.string().optional(),name:Q.string().optional(),source:l,set:Q.object({name:Q.string().trim().min(1).optional(),email:Q.string().nullable().optional(),
|
|
6798
|
+
tag:Q.string().nullable().optional().describe(`Their role in the owner's finances \u2014 a member tag: family, household help, landlord. Null or "" clears.`)}).passthrough()})},w=>a(()=>CN(t.dir,i(),w))),s("add_member",{...z0,inputSchema:Q.object({name:Q.string().trim().min(1).describe("The name, as the owner said it. Refused when another person already wears it."),tag:Q.string().optional().describe("Their role in the owner's finances \u2014 a member tag: family, household help, landlord."),email:Q.
|
|
6799
|
+
string().optional().describe("Where a shared report reaches them."),source:l}).passthrough()},w=>a(()=>IN(t.dir,i(),w))),s("add_account",{...B0,inputSchema:Q.object({name:Q.string().trim().min(1).describe('The display name \u2014 "Visa 9292", the last four digits at most. Refused when another account already wears it.'),tag:Q.string().optional().describe(`The account type, in the app's own words \u2014 "credit card", "bank account", "UPI", "wallet", "cash".`),linked_to:Q.string().optional().describe(
|
|
6800
|
+
"The account this one is linked to \u2014 a card to the bank account that pays it \u2014 by name or id. One level only."),member:Q.string().optional().describe("The person the account belongs to, by name or id as the memory holds them."),notes:Q.string().optional().describe(au),balance:Q.number().finite().optional().describe("What the account held on balance_date."),balance_date:o.optional().describe("The day the balance was true. Left out beside a balance, the day of the write is used."),source:l}).
|
|
6801
|
+
passthrough()},w=>a(()=>RN(t.dir,i(),w))),s("rename_tag",{...L0,inputSchema:Q.object({kind:Q.enum(ll).describe("Which list the tag belongs to."),from:Q.string().trim().min(1).describe("The tag as the vault holds it, any casing."),to:Q.string().trim().min(1).describe("The new name, in the owner's words."),source:l})},w=>a(()=>EN(t.dir,i(),w))),s("delete_tag",{...$0,inputSchema:Q.object({kind:Q.enum(ll).describe("Which list the tag belongs to."),name:Q.string().trim().min(1).describe("The tag as t\
|
|
6802
|
+
he vault holds it, any casing."),source:l})},w=>a(()=>PN(t.dir,i(),w))),s("delete_commitment",{...H0,inputSchema:Q.object({id:Q.string().trim().min(1).describe("The commitment id, from commitments or search. By id only, never by name."),source:l})},w=>a(()=>jN(t.dir,i(),w)));let m=w=>Q.array(Q.string()).nullish().describe(`${w}, each by name as the memory holds it. Left out or empty: all of them.`);s("create_report",{...W0,inputSchema:Q.object({title:Q.string().describe(U0),start_date:Q.string().
|
|
6803
|
+
describe(V0),end_date:Q.string().describe(G0),accounts:m('The accounts the report covers, or "No account" for charges billed to none'),members:m("The people the report covers"),categories:m('The categories the report covers, or "No category" for untagged charges'),source:l}).passthrough()},w=>a(()=>Z$(t.dir,i(),w))),s("read_guide",{...Ya("read_guide"),inputSchema:Q.object({section:Q.string().optional()}).default({})},w=>a(()=>eN(t.readContractFile(cu),w.section))),s("tags",{...Ya("tags")},()=>a(
|
|
6804
|
+
()=>lw(t.load()))),s("accounts",{...Ya("accounts")},()=>a(()=>y6(t.load()))),s("members",{...Ya("members")},()=>a(()=>v6(t.load()))),s("whoami",{...Ya("whoami")},()=>a(()=>tN({loadData:e,llmsText:()=>t.readContractFile(cu),schemaText:()=>t.readContractFile(Bf),writeMode:"direct",identity:()=>({server:"longbook (this Mac)",vault:t.dir,connected_as:i(),writes:"straight to the folder \u2014 every batch lands in the app's Changes screen for review"})})));for(let w of Rf){let b=y=>{let v=v0(w.name,y);
|
|
6805
|
+
if(!v)throw new Error(`no catalogue entry for prompt ${w.name}`);return v};w.arguments?n.registerPrompt(w.name,{title:w.title,description:w.description,argsSchema:{month:Q.string().optional().describe(_4)}},({month:y})=>b(y)):n.registerPrompt(w.name,{title:w.title,description:w.description},()=>b())}n.server.setRequestHandler(Th,w=>{let b=v0(w.params.name,w.params.arguments?.month,new Date,y=>y.getMonth());if(!b)throw new Ke(at.InvalidParams,`No prompt named ${w.params.name}. Prompts: ${Rf.map(y=>y.
|
|
6806
|
+
name).join(", ")}`);return b}),n.registerResource("llms",`longbook://vault/${cu}`,{title:"How to read this memory",description:"The vault's own llms.txt \u2014 the contract any AI reading these files follows.",mimeType:"text/plain"},w=>({contents:[{uri:w.href,mimeType:"text/plain",text:t.readContractFile(cu)}]})),n.registerResource("schema",`longbook://vault/${Bf}`,{title:"Financial memory schema",description:"The JSON Schema the financial memory file conforms to.",mimeType:"application/json"},w=>({
|
|
6807
|
+
contents:[{uri:w.href,mimeType:"application/json",text:t.readContractFile(Bf)}]})),n.registerResource(ol.name,ol.uri,{title:ol.title,description:ol.description,mimeType:ol.mimeType},w=>({contents:[{uri:w.href,mimeType:ol.mimeType,text:t.readContractFile(_6)}]}));let g=[["ui://longbook/next-payment.html",()=>p0(sw(t.load()))],["ui://longbook/upcoming.html",()=>g0(aw(t.load(),30))],["ui://longbook/cashflow.html",()=>w0(rw(t.load(),0,12))],["ui://longbook/commitments.html",()=>b0(iw(t.load(),"activ\
|
|
6808
|
+
e"))]];for(let[w,b]of g){let y=j4.find(v=>v.uri===w);if(!y)throw new Error(`no catalog entry for card ${w}`);n.registerResource(y.name,y.uri,{title:y.title,description:y.description,mimeType:y.mimeType},v=>{let k;try{k=b()}catch(j){k=tu(j instanceof Error?j.message:String(j))}return{contents:[{uri:v.href,mimeType:y.mimeType,text:k}]}})}return n}async function hie(){let t;try{t=new lu(aN())}catch(e){console.error(e instanceof Error?e.message:String(e)),process.exit(1)}try{t.load()}catch(e){console.
|
|
6809
|
+
error(e instanceof Error?e.message:String(e))}await cie(t).connect(new r0)}process.argv[1]&&import.meta.url===lie(oie(process.argv[1])).href&&hie();export{cie as buildServer};
|
|
6809
6810
|
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@longbook/mcp",
|
|
3
|
-
"version": "1.40.
|
|
3
|
+
"version": "1.40.4",
|
|
4
4
|
"mcpName": "app.longbook/mcp",
|
|
5
5
|
"license": "GPL-3.0-only",
|
|
6
|
-
"description": "The longbook MCP server: your longbook folder, readable by the AI you already use.
|
|
6
|
+
"description": "The longbook MCP server: your longbook folder, readable by the AI you already use. Real arithmetic on what is due and what renews; changes go through the app's Changes screen. mcprush.com-claim-longbook-mcp-5dd29bf58ce121bd23d37ac6",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"mcp",
|
|
9
9
|
"model-context-protocol",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"subscriptions",
|
|
12
12
|
"longbook"
|
|
13
13
|
],
|
|
14
|
-
"homepage": "https://longbook.app",
|
|
14
|
+
"homepage": "https://longbook.app/features/longbook-npm-package/",
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|
|
17
17
|
"url": "git+https://github.com/MXmaster2s/longbook-code.git",
|
package/server.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "app.longbook/mcp",
|
|
4
4
|
"title": "longbook",
|
|
5
5
|
"description": "Your longbook of bills, subscriptions and expenses, for your AI to read and to suggest changes to.",
|
|
6
|
-
"version": "1.40.
|
|
6
|
+
"version": "1.40.4",
|
|
7
7
|
"websiteUrl": "https://longbook.app/mcp/",
|
|
8
8
|
"repository": {
|
|
9
9
|
"url": "https://github.com/MXmaster2s/longbook-code",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
{
|
|
30
30
|
"registryType": "npm",
|
|
31
31
|
"identifier": "@longbook/mcp",
|
|
32
|
-
"version": "1.40.
|
|
32
|
+
"version": "1.40.4",
|
|
33
33
|
"runtimeHint": "npx",
|
|
34
34
|
"transport": {
|
|
35
35
|
"type": "stdio"
|