@nirvana-labs/nirvana-mcp 1.54.0 → 1.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs-search-tool.d.mts.map +1 -1
- package/docs-search-tool.d.ts.map +1 -1
- package/docs-search-tool.js +1 -1
- package/docs-search-tool.js.map +1 -1
- package/docs-search-tool.mjs +1 -1
- package/docs-search-tool.mjs.map +1 -1
- package/instructions.js +2 -12
- package/instructions.js.map +1 -1
- package/instructions.mjs +2 -12
- package/instructions.mjs.map +1 -1
- package/package.json +2 -2
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/docs-search-tool.ts +2 -1
- package/src/instructions.ts +2 -12
- package/src/server.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-search-tool.d.mts","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"OAEO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,EAAE,QAAQ,EAAE,iBAAiB,EAAuB;AAG3D,eAAO,MAAM,QAAQ,EAAE,QAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"docs-search-tool.d.mts","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"OAEO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,EAAE,QAAQ,EAAE,iBAAiB,EAAuB;AAG3D,eAAO,MAAM,QAAQ,EAAE,QAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA2BlB,CAAC;AAKF,eAAO,MAAM,OAAO,GAAU,uBAG3B;IACD,UAAU,EAAE,iBAAiB,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;CAC3C,8CA8CA,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCAjDC;QACD,UAAU,EAAE,iBAAiB,CAAC;QAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;KAC3C;;AAgDD,wBAA2C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-search-tool.d.ts","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"OAEO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,EAAE,QAAQ,EAAE,iBAAiB,EAAuB;AAG3D,eAAO,MAAM,QAAQ,EAAE,QAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"docs-search-tool.d.ts","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"OAEO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,EAAE,QAAQ,EAAE,iBAAiB,EAAuB;AAG3D,eAAO,MAAM,QAAQ,EAAE,QAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA2BlB,CAAC;AAKF,eAAO,MAAM,OAAO,GAAU,uBAG3B;IACD,UAAU,EAAE,iBAAiB,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;CAC3C,8CA8CA,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCAjDC;QACD,UAAU,EAAE,iBAAiB,CAAC;QAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;KAC3C;;AAgDD,wBAA2C"}
|
package/docs-search-tool.js
CHANGED
|
@@ -12,7 +12,7 @@ exports.metadata = {
|
|
|
12
12
|
};
|
|
13
13
|
exports.tool = {
|
|
14
14
|
name: 'search_docs',
|
|
15
|
-
description: 'Search
|
|
15
|
+
description: 'Search SDK documentation to find methods, parameters, and usage examples for interacting with the API. Use this before writing code when you need to discover the right approach.',
|
|
16
16
|
inputSchema: {
|
|
17
17
|
type: 'object',
|
|
18
18
|
properties: {
|
package/docs-search-tool.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-search-tool.js","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAGtF,sCAA2E;AAC3E,wCAAqC;AAExB,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;CAClB,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,aAAa;IACnB,WAAW,
|
|
1
|
+
{"version":3,"file":"docs-search-tool.js","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAGtF,sCAA2E;AAC3E,wCAAqC;AAExB,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;CAClB,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,aAAa;IACnB,WAAW,EACT,mLAAmL;IACrL,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0BAA0B;aACxC;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,yCAAyC;gBACtD,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC;aAClG;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iCAAiC;gBAC9C,IAAI,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;aAC7B;SACF;QACD,QAAQ,EAAE,CAAC,OAAO,EAA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,yCAAyC,SAAS,EAAE,CAC3F,CAAC;IACJ,CAAC;IAED,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;IACvC,MAAM,CAAC,IAAI,CACT;QACE,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS;QAClC,KAAK,EAAE,IAAI,CAAC,KAAK;KAClB,EACD,wBAAwB,CACzB,CAAC;IACF,OAAO,IAAA,2BAAmB,EAAC,UAAU,CAAC,CAAC;AACzC,CAAC,CAAC;AApDW,QAAA,OAAO,WAoDlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|
package/docs-search-tool.mjs
CHANGED
|
@@ -9,7 +9,7 @@ export const metadata = {
|
|
|
9
9
|
};
|
|
10
10
|
export const tool = {
|
|
11
11
|
name: 'search_docs',
|
|
12
|
-
description: 'Search
|
|
12
|
+
description: 'Search SDK documentation to find methods, parameters, and usage examples for interacting with the API. Use this before writing code when you need to discover the right approach.',
|
|
13
13
|
inputSchema: {
|
|
14
14
|
type: 'object',
|
|
15
15
|
properties: {
|
package/docs-search-tool.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-search-tool.mjs","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAG/E,EAA+B,mBAAmB,EAAE;OACpD,EAAE,SAAS,EAAE;AAEpB,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,aAAa;IACnB,WAAW,
|
|
1
|
+
{"version":3,"file":"docs-search-tool.mjs","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":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@@ async function fetchLatestInstructions(stainlessApiKey) {
|
|
|
37
37
|
let instructions;
|
|
38
38
|
if (!response.ok) {
|
|
39
39
|
(0, logger_1.getLogger)().warn('Warning: failed to retrieve MCP server instructions. Proceeding with default instructions...');
|
|
40
|
-
instructions =
|
|
41
|
-
|
|
42
|
-
actions. You can use search_docs tool to learn about how to take action with this server. Then,
|
|
43
|
-
you will write TypeScript code using the execute tool take action. It is CRITICAL that you be
|
|
44
|
-
thoughtful and deliberate when executing code. Always try to entirely solve the problem in code
|
|
45
|
-
block: it can be as long as you need to get the job done!
|
|
46
|
-
`;
|
|
40
|
+
instructions =
|
|
41
|
+
'\n This is the nirvana MCP server.\n\n Available tools:\n - search_docs: Search SDK documentation to find the right methods and parameters.\n - execute: Run TypeScript code against a pre-authenticated SDK client. Define an async run(client) function.\n\n Workflow:\n - If unsure about the API, call search_docs first.\n - Write complete solutions in a single execute call when possible. For large datasets, use API filters to narrow results or paginate within a single execute block.\n - If execute returns an error, read the error and fix your code rather than retrying the same approach.\n - Variables do not persist between execute calls. Return or log all data you need.\n - Individual HTTP requests to the API have a 30-second timeout. If a request times out, try a smaller query or add filters.\n - Code execution has a total timeout of approximately 5 minutes. If your code times out, simplify it or break it into smaller steps.\n ';
|
|
47
42
|
}
|
|
48
43
|
instructions ??= (await response.json()).instructions;
|
|
49
|
-
instructions = `
|
|
50
|
-
If needed, you can get the current time by executing Date.now().
|
|
51
|
-
|
|
52
|
-
${instructions}
|
|
53
|
-
`;
|
|
54
44
|
return instructions;
|
|
55
45
|
}
|
|
56
46
|
//# sourceMappingURL=instructions.js.map
|
package/instructions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["src/instructions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;AA2BtF,0CAWC;AApCD,oCAAiC;AACjC,wCAAqC;AAErC,MAAM,yBAAyB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,aA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C;IAED,MAAM,mBAAmB,GAAG,MAAM,uBAAuB,CAAC,eAAe,CAAC,CAAC;IAC3E,iBAAiB,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,mBAAmB,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IAChF,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AAED,KAAK,UAAU,uBAAuB,CAAC,eAAmC;IACxE,iEAAiE;IACjE,iDAAiD;IACjD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAC1B,IAAA,cAAO,EAAC,4BAA4B,CAAC,IAAI,uDAAuD,EAChG;QACE,MAAM,EAAE,KAAK;QACb,OAAO,EAAE,EAAE,GAAG,CAAC,eAAe,IAAI,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC,EAAE;KACxE,CACF,CAAC;IAEF,IAAI,YAAgC,CAAC;IACrC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,IAAA,kBAAS,GAAE,CAAC,IAAI,CACd,8FAA8F,CAC/F,CAAC;QAEF,YAAY;YACV,w7BAAw7B,CAAC;IAC77B,CAAC;IAED,YAAY,KAAM,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAA8B,CAAC,YAAY,CAAC;IAEpF,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
package/instructions.mjs
CHANGED
|
@@ -34,20 +34,10 @@ async function fetchLatestInstructions(stainlessApiKey) {
|
|
|
34
34
|
let instructions;
|
|
35
35
|
if (!response.ok) {
|
|
36
36
|
getLogger().warn('Warning: failed to retrieve MCP server instructions. Proceeding with default instructions...');
|
|
37
|
-
instructions =
|
|
38
|
-
|
|
39
|
-
actions. You can use search_docs tool to learn about how to take action with this server. Then,
|
|
40
|
-
you will write TypeScript code using the execute tool take action. It is CRITICAL that you be
|
|
41
|
-
thoughtful and deliberate when executing code. Always try to entirely solve the problem in code
|
|
42
|
-
block: it can be as long as you need to get the job done!
|
|
43
|
-
`;
|
|
37
|
+
instructions =
|
|
38
|
+
'\n This is the nirvana MCP server.\n\n Available tools:\n - search_docs: Search SDK documentation to find the right methods and parameters.\n - execute: Run TypeScript code against a pre-authenticated SDK client. Define an async run(client) function.\n\n Workflow:\n - If unsure about the API, call search_docs first.\n - Write complete solutions in a single execute call when possible. For large datasets, use API filters to narrow results or paginate within a single execute block.\n - If execute returns an error, read the error and fix your code rather than retrying the same approach.\n - Variables do not persist between execute calls. Return or log all data you need.\n - Individual HTTP requests to the API have a 30-second timeout. If a request times out, try a smaller query or add filters.\n - Code execution has a total timeout of approximately 5 minutes. If your code times out, simplify it or break it into smaller steps.\n ';
|
|
44
39
|
}
|
|
45
40
|
instructions ??= (await response.json()).instructions;
|
|
46
|
-
instructions = `
|
|
47
|
-
If needed, you can get the current time by executing Date.now().
|
|
48
|
-
|
|
49
|
-
${instructions}
|
|
50
|
-
`;
|
|
51
41
|
return instructions;
|
|
52
42
|
}
|
|
53
43
|
//# sourceMappingURL=instructions.mjs.map
|
package/instructions.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instructions.mjs","sourceRoot":"","sources":["src/instructions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,OAAO,EAAE;OACX,EAAE,SAAS,EAAE;AAEpB,MAAM,yBAAyB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,aAAa;AAO/D,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAkC,CAAC;AAEpE,0EAA0E;AAC1E,MAAM,qBAAqB,GAAG,WAAW,CAAC,GAAG,EAAE;IAC7C,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACvB,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,iBAAiB,EAAE,CAAC;QAC7C,IAAI,GAAG,GAAG,KAAK,CAAC,SAAS,GAAG,yBAAyB,EAAE,CAAC;YACtD,iBAAiB,CAAC,MAAM,CAAC,GAAG,CAAC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,4BAA4B,CAAC,IAAI,uDAAuD,EAChG;QACE,MAAM,EAAE,KAAK;QACb,OAAO,EAAE,EAAE,GAAG,CAAC,eAAe,IAAI,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC,EAAE;KACxE,CACF,CAAC;IAEF,IAAI,YAAgC,CAAC;IACrC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,SAAS,EAAE,CAAC,IAAI,CACd,8FAA8F,CAC/F,CAAC;QAEF,YAAY;YACV,w7BAAw7B,CAAC;IAC77B,CAAC;IAED,YAAY,KAAM,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAA8B,CAAC,YAAY,CAAC;IAEpF,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nirvana-labs/nirvana-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.55.0",
|
|
4
4
|
"description": "The official MCP Server for the Nirvana Labs API",
|
|
5
5
|
"author": "Nirvana Labs <engineering@nirvanalabs.io>",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@nirvana-labs/nirvana": "^1.
|
|
21
|
+
"@nirvana-labs/nirvana": "^1.55.0",
|
|
22
22
|
"@cloudflare/cabidela": "^0.2.4",
|
|
23
23
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
24
24
|
"@valtown/deno-http-worker": "^0.0.21",
|
package/server.js
CHANGED
|
@@ -17,7 +17,7 @@ const instructions_1 = require("./instructions.js");
|
|
|
17
17
|
const methods_1 = require("./methods.js");
|
|
18
18
|
const newMcpServer = async (stainlessApiKey) => new mcp_js_1.McpServer({
|
|
19
19
|
name: 'nirvana_labs_nirvana_api',
|
|
20
|
-
version: '1.
|
|
20
|
+
version: '1.55.0',
|
|
21
21
|
}, {
|
|
22
22
|
instructions: await (0, instructions_1.getInstructions)(stainlessApiKey),
|
|
23
23
|
capabilities: { tools: {}, logging: {} },
|
package/server.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { getInstructions } from "./instructions.mjs";
|
|
|
8
8
|
import { blockedMethodsForCodeTool } from "./methods.mjs";
|
|
9
9
|
export const newMcpServer = async (stainlessApiKey) => new McpServer({
|
|
10
10
|
name: 'nirvana_labs_nirvana_api',
|
|
11
|
-
version: '1.
|
|
11
|
+
version: '1.55.0',
|
|
12
12
|
}, {
|
|
13
13
|
instructions: await getInstructions(stainlessApiKey),
|
|
14
14
|
capabilities: { tools: {}, logging: {} },
|
package/src/docs-search-tool.ts
CHANGED
|
@@ -13,7 +13,8 @@ export const metadata: Metadata = {
|
|
|
13
13
|
|
|
14
14
|
export const tool: Tool = {
|
|
15
15
|
name: 'search_docs',
|
|
16
|
-
description:
|
|
16
|
+
description:
|
|
17
|
+
'Search SDK documentation to find methods, parameters, and usage examples for interacting with the API. Use this before writing code when you need to discover the right approach.',
|
|
17
18
|
inputSchema: {
|
|
18
19
|
type: 'object',
|
|
19
20
|
properties: {
|
package/src/instructions.ts
CHANGED
|
@@ -55,21 +55,11 @@ async function fetchLatestInstructions(stainlessApiKey: string | undefined): Pro
|
|
|
55
55
|
'Warning: failed to retrieve MCP server instructions. Proceeding with default instructions...',
|
|
56
56
|
);
|
|
57
57
|
|
|
58
|
-
instructions =
|
|
59
|
-
This is the nirvana MCP server.
|
|
60
|
-
actions. You can use search_docs tool to learn about how to take action with this server. Then,
|
|
61
|
-
you will write TypeScript code using the execute tool take action. It is CRITICAL that you be
|
|
62
|
-
thoughtful and deliberate when executing code. Always try to entirely solve the problem in code
|
|
63
|
-
block: it can be as long as you need to get the job done!
|
|
64
|
-
`;
|
|
58
|
+
instructions =
|
|
59
|
+
'\n This is the nirvana MCP server.\n\n Available tools:\n - search_docs: Search SDK documentation to find the right methods and parameters.\n - execute: Run TypeScript code against a pre-authenticated SDK client. Define an async run(client) function.\n\n Workflow:\n - If unsure about the API, call search_docs first.\n - Write complete solutions in a single execute call when possible. For large datasets, use API filters to narrow results or paginate within a single execute block.\n - If execute returns an error, read the error and fix your code rather than retrying the same approach.\n - Variables do not persist between execute calls. Return or log all data you need.\n - Individual HTTP requests to the API have a 30-second timeout. If a request times out, try a smaller query or add filters.\n - Code execution has a total timeout of approximately 5 minutes. If your code times out, simplify it or break it into smaller steps.\n ';
|
|
65
60
|
}
|
|
66
61
|
|
|
67
62
|
instructions ??= ((await response.json()) as { instructions: string }).instructions;
|
|
68
|
-
instructions = `
|
|
69
|
-
If needed, you can get the current time by executing Date.now().
|
|
70
|
-
|
|
71
|
-
${instructions}
|
|
72
|
-
`;
|
|
73
63
|
|
|
74
64
|
return instructions;
|
|
75
65
|
}
|
package/src/server.ts
CHANGED