@mcpc-tech/core 0.3.19 → 0.3.21
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/index.cjs +115 -88
- package/index.mjs +115 -88
- package/package.json +1 -1
- package/plugins/large-result.cjs +6 -7
- package/plugins/large-result.mjs +6 -7
- package/plugins/search.cjs +2 -4
- package/plugins/search.mjs +2 -4
- package/plugins.cjs +5 -7
- package/plugins.mjs +5 -7
- package/types/src/compose.d.ts +1 -0
- package/types/src/compose.d.ts.map +1 -1
- package/types/src/plugins/large-result.d.ts.map +1 -1
- package/types/src/plugins/search-tool.d.ts +1 -1
- package/types/src/plugins/search-tool.d.ts.map +1 -1
package/index.cjs
CHANGED
|
@@ -17784,7 +17784,7 @@ You must follow the <manual/>, obey the <rules/>, and use the <format/>.
|
|
|
17784
17784
|
|
|
17785
17785
|
<parameters>
|
|
17786
17786
|
\`tool\` - Which tool to execute: "man" to get schemas, or a tool name to execute
|
|
17787
|
-
\`args\` - For "man":
|
|
17787
|
+
\`args\` - For "man": { tools: ["tool1", "tool2"] }. For other tools: tool parameters that strictly adhere to the tool's JSON schema.
|
|
17788
17788
|
</parameters>
|
|
17789
17789
|
|
|
17790
17790
|
<rules>
|
|
@@ -17799,7 +17799,7 @@ Get tool schemas:
|
|
|
17799
17799
|
\`\`\`json
|
|
17800
17800
|
{
|
|
17801
17801
|
"tool": "man",
|
|
17802
|
-
"args": ["tool1", "tool2"]
|
|
17802
|
+
"args": { "tools": ["tool1", "tool2"] }
|
|
17803
17803
|
}
|
|
17804
17804
|
\`\`\`
|
|
17805
17805
|
|
|
@@ -17898,6 +17898,106 @@ var CompiledPrompts = {
|
|
|
17898
17898
|
completionMessage: () => ResponseTemplates.COMPLETION_MESSAGE
|
|
17899
17899
|
};
|
|
17900
17900
|
|
|
17901
|
+
// __mcpc__core_latest/node_modules/@mcpc/core/src/factories/args-def-factory.js
|
|
17902
|
+
function createArgsDefFactory(_name, _allToolNames, _depGroups, _predefinedSteps, _ensureStepActions) {
|
|
17903
|
+
return {
|
|
17904
|
+
forSampling: function() {
|
|
17905
|
+
return {
|
|
17906
|
+
type: "object",
|
|
17907
|
+
description: "Provide prompt for autonomous tool execution",
|
|
17908
|
+
properties: {
|
|
17909
|
+
prompt: {
|
|
17910
|
+
type: "string",
|
|
17911
|
+
description: "The task to be completed autonomously by the agentic system using available tools"
|
|
17912
|
+
},
|
|
17913
|
+
context: {
|
|
17914
|
+
type: "object",
|
|
17915
|
+
description: "Execution context, e.g., { cwd: '/path/to/dir' }. Any relevant fields allowed.",
|
|
17916
|
+
additionalProperties: true
|
|
17917
|
+
}
|
|
17918
|
+
},
|
|
17919
|
+
required: [
|
|
17920
|
+
"prompt",
|
|
17921
|
+
"context"
|
|
17922
|
+
],
|
|
17923
|
+
errorMessage: {
|
|
17924
|
+
required: {
|
|
17925
|
+
prompt: "Missing required field 'prompt'. Please provide a clear task description.",
|
|
17926
|
+
context: "Missing required field 'context'. Please provide relevant context (e.g., { cwd: '...' })."
|
|
17927
|
+
}
|
|
17928
|
+
}
|
|
17929
|
+
};
|
|
17930
|
+
},
|
|
17931
|
+
/**
|
|
17932
|
+
* Agentic schema - simplified Unix-style interface
|
|
17933
|
+
*
|
|
17934
|
+
* Only two fields:
|
|
17935
|
+
* - `tool`: which tool to execute (enum includes "man" + all tool names)
|
|
17936
|
+
* - `args`: object with parameters. For "man": { tools: ["a", "b"] }. For others: tool parameters.
|
|
17937
|
+
*/
|
|
17938
|
+
forAgentic: function(allToolNames) {
|
|
17939
|
+
const toolEnum = [
|
|
17940
|
+
"man",
|
|
17941
|
+
...allToolNames
|
|
17942
|
+
];
|
|
17943
|
+
return {
|
|
17944
|
+
type: "object",
|
|
17945
|
+
properties: {
|
|
17946
|
+
tool: {
|
|
17947
|
+
type: "string",
|
|
17948
|
+
enum: toolEnum,
|
|
17949
|
+
description: 'Which tool to execute. Use "man" to get tool schemas, or a tool name to execute.',
|
|
17950
|
+
errorMessage: {
|
|
17951
|
+
enum: `Invalid tool. Available: ${toolEnum.join(", ")}`
|
|
17952
|
+
}
|
|
17953
|
+
},
|
|
17954
|
+
args: {
|
|
17955
|
+
type: "object",
|
|
17956
|
+
description: `For "man": { tools: ["tool1", "tool2"] }. For other tools: tool parameters that strictly adhere to the tool's JSON schema.`
|
|
17957
|
+
}
|
|
17958
|
+
},
|
|
17959
|
+
required: [
|
|
17960
|
+
"tool"
|
|
17961
|
+
],
|
|
17962
|
+
additionalProperties: false
|
|
17963
|
+
};
|
|
17964
|
+
},
|
|
17965
|
+
/**
|
|
17966
|
+
* Schema for "man" command args validation
|
|
17967
|
+
* Expected format: { tools: ["tool1", "tool2"] }
|
|
17968
|
+
*/
|
|
17969
|
+
forMan: function(allToolNames) {
|
|
17970
|
+
return {
|
|
17971
|
+
type: "object",
|
|
17972
|
+
properties: {
|
|
17973
|
+
tools: {
|
|
17974
|
+
type: "array",
|
|
17975
|
+
items: {
|
|
17976
|
+
type: "string",
|
|
17977
|
+
enum: allToolNames,
|
|
17978
|
+
errorMessage: {
|
|
17979
|
+
enum: `Invalid tool name. Available: ${allToolNames.join(", ")}`
|
|
17980
|
+
}
|
|
17981
|
+
},
|
|
17982
|
+
minItems: 1,
|
|
17983
|
+
errorMessage: {
|
|
17984
|
+
minItems: "At least one tool name is required"
|
|
17985
|
+
}
|
|
17986
|
+
}
|
|
17987
|
+
},
|
|
17988
|
+
required: [
|
|
17989
|
+
"tools"
|
|
17990
|
+
],
|
|
17991
|
+
errorMessage: {
|
|
17992
|
+
required: {
|
|
17993
|
+
tools: 'Missing "tools" field. Expected: { tools: ["tool1", "tool2"] }'
|
|
17994
|
+
}
|
|
17995
|
+
}
|
|
17996
|
+
};
|
|
17997
|
+
}
|
|
17998
|
+
};
|
|
17999
|
+
}
|
|
18000
|
+
|
|
17901
18001
|
// __mcpc__core_latest/node_modules/@mcpc/core/src/utils/schema-validator.js
|
|
17902
18002
|
var import_ajv2 = require("ajv");
|
|
17903
18003
|
var import_ajv_formats2 = __toESM(require("ajv-formats"), 1);
|
|
@@ -18069,22 +18169,9 @@ var AgenticExecutor = class {
|
|
|
18069
18169
|
}
|
|
18070
18170
|
const tool2 = args.tool;
|
|
18071
18171
|
if (tool2 === "man") {
|
|
18072
|
-
const
|
|
18073
|
-
|
|
18074
|
-
|
|
18075
|
-
type: "string",
|
|
18076
|
-
enum: this.allToolNames,
|
|
18077
|
-
errorMessage: {
|
|
18078
|
-
enum: `Invalid tool name. Available: ${this.allToolNames.join(", ")}`
|
|
18079
|
-
}
|
|
18080
|
-
},
|
|
18081
|
-
minItems: 1,
|
|
18082
|
-
errorMessage: {
|
|
18083
|
-
type: 'Expected an array of tool names, e.g. ["tool1", "tool2"]',
|
|
18084
|
-
minItems: "At least one tool name is required"
|
|
18085
|
-
}
|
|
18086
|
-
};
|
|
18087
|
-
const manValidation = validateSchema(args.args ?? [], manSchema);
|
|
18172
|
+
const createArgsDef = createArgsDefFactory(this.name, this.allToolNames, {});
|
|
18173
|
+
const manSchema = createArgsDef.forMan(this.allToolNames);
|
|
18174
|
+
const manValidation = validateSchema(args.args ?? {}, manSchema);
|
|
18088
18175
|
if (!manValidation.valid) {
|
|
18089
18176
|
return {
|
|
18090
18177
|
content: [
|
|
@@ -18096,7 +18183,8 @@ var AgenticExecutor = class {
|
|
|
18096
18183
|
isError: true
|
|
18097
18184
|
};
|
|
18098
18185
|
}
|
|
18099
|
-
|
|
18186
|
+
const argsObj = args.args;
|
|
18187
|
+
return this.handleManCommand(argsObj.tools, executeSpan);
|
|
18100
18188
|
}
|
|
18101
18189
|
const toolArgs = args.args || {};
|
|
18102
18190
|
return await this.executeTool(tool2, toolArgs, executeSpan);
|
|
@@ -18273,72 +18361,6 @@ ${JSON.stringify(cleanedSchema, null, 2)}
|
|
|
18273
18361
|
}
|
|
18274
18362
|
};
|
|
18275
18363
|
|
|
18276
|
-
// __mcpc__core_latest/node_modules/@mcpc/core/src/factories/args-def-factory.js
|
|
18277
|
-
function createArgsDefFactory(_name, _allToolNames, _depGroups, _predefinedSteps, _ensureStepActions) {
|
|
18278
|
-
return {
|
|
18279
|
-
forSampling: function() {
|
|
18280
|
-
return {
|
|
18281
|
-
type: "object",
|
|
18282
|
-
description: "Provide prompt for autonomous tool execution",
|
|
18283
|
-
properties: {
|
|
18284
|
-
prompt: {
|
|
18285
|
-
type: "string",
|
|
18286
|
-
description: "The task to be completed autonomously by the agentic system using available tools"
|
|
18287
|
-
},
|
|
18288
|
-
context: {
|
|
18289
|
-
type: "object",
|
|
18290
|
-
description: "Execution context, e.g., { cwd: '/path/to/dir' }. Any relevant fields allowed.",
|
|
18291
|
-
additionalProperties: true
|
|
18292
|
-
}
|
|
18293
|
-
},
|
|
18294
|
-
required: [
|
|
18295
|
-
"prompt",
|
|
18296
|
-
"context"
|
|
18297
|
-
],
|
|
18298
|
-
errorMessage: {
|
|
18299
|
-
required: {
|
|
18300
|
-
prompt: "Missing required field 'prompt'. Please provide a clear task description.",
|
|
18301
|
-
context: "Missing required field 'context'. Please provide relevant context (e.g., { cwd: '...' })."
|
|
18302
|
-
}
|
|
18303
|
-
}
|
|
18304
|
-
};
|
|
18305
|
-
},
|
|
18306
|
-
/**
|
|
18307
|
-
* Agentic schema - simplified Unix-style interface
|
|
18308
|
-
*
|
|
18309
|
-
* Only two fields:
|
|
18310
|
-
* - `tool`: which tool to execute (enum includes "man" + all tool names)
|
|
18311
|
-
* - `args`: parameters for the tool (array for "man", object for others)
|
|
18312
|
-
*/
|
|
18313
|
-
forAgentic: function(allToolNames) {
|
|
18314
|
-
const toolEnum = [
|
|
18315
|
-
"man",
|
|
18316
|
-
...allToolNames
|
|
18317
|
-
];
|
|
18318
|
-
return {
|
|
18319
|
-
type: "object",
|
|
18320
|
-
properties: {
|
|
18321
|
-
tool: {
|
|
18322
|
-
type: "string",
|
|
18323
|
-
enum: toolEnum,
|
|
18324
|
-
description: 'Which tool to execute. Use "man" to get tool schemas, or a tool name to execute.',
|
|
18325
|
-
errorMessage: {
|
|
18326
|
-
enum: `Invalid tool. Available: ${toolEnum.join(", ")}`
|
|
18327
|
-
}
|
|
18328
|
-
},
|
|
18329
|
-
args: {
|
|
18330
|
-
description: 'For "man": array of tool names ["tool1", "tool2"]. For other tools: object with parameters.'
|
|
18331
|
-
}
|
|
18332
|
-
},
|
|
18333
|
-
required: [
|
|
18334
|
-
"tool"
|
|
18335
|
-
],
|
|
18336
|
-
additionalProperties: false
|
|
18337
|
-
};
|
|
18338
|
-
}
|
|
18339
|
-
};
|
|
18340
|
-
}
|
|
18341
|
-
|
|
18342
18364
|
// __mcpc__core_latest/node_modules/@mcpc/core/src/executors/agentic/agentic-tool-registrar.js
|
|
18343
18365
|
function registerAgenticTool(server, { description, name, allToolNames, depGroups, toolNameToDetailList }) {
|
|
18344
18366
|
const createArgsDef = createArgsDefFactory(name, allToolNames, depGroups, void 0, void 0);
|
|
@@ -19665,7 +19687,7 @@ var ToolManager = class {
|
|
|
19665
19687
|
description,
|
|
19666
19688
|
schema
|
|
19667
19689
|
});
|
|
19668
|
-
if (options.
|
|
19690
|
+
if (options.hidden) {
|
|
19669
19691
|
this.toolConfigs.set(name, {
|
|
19670
19692
|
visibility: {
|
|
19671
19693
|
hidden: true
|
|
@@ -19685,6 +19707,11 @@ var ToolManager = class {
|
|
|
19685
19707
|
inputSchema: schema
|
|
19686
19708
|
});
|
|
19687
19709
|
}
|
|
19710
|
+
this.toolConfigs.set(name, {
|
|
19711
|
+
visibility: {
|
|
19712
|
+
public: true
|
|
19713
|
+
}
|
|
19714
|
+
});
|
|
19688
19715
|
}
|
|
19689
19716
|
/**
|
|
19690
19717
|
* Check if a tool is public (exposed to MCP clients)
|
|
@@ -20293,11 +20320,11 @@ var ComposableMCPServer = class extends Server {
|
|
|
20293
20320
|
const toolNameToDetailList = Object.entries(allTools);
|
|
20294
20321
|
const publicToolNames = this.getPublicToolNames();
|
|
20295
20322
|
const hiddenToolNames = this.getHiddenToolNames();
|
|
20296
|
-
const contextToolNames = toolNameToDetailList.map(([name2]) => name2).filter((n) => !hiddenToolNames.includes(n));
|
|
20323
|
+
const contextToolNames = toolNameToDetailList.map(([name2]) => name2).filter((n) => !hiddenToolNames.includes(n) && !publicToolNames.includes(n));
|
|
20297
20324
|
publicToolNames.forEach((toolId) => {
|
|
20298
20325
|
const tool2 = allTools[toolId];
|
|
20299
20326
|
if (!tool2) {
|
|
20300
|
-
|
|
20327
|
+
return;
|
|
20301
20328
|
}
|
|
20302
20329
|
this.tool(toolId, tool2.description || "", jsonSchema(tool2.inputSchema), tool2.execute, {
|
|
20303
20330
|
internal: false
|
package/index.mjs
CHANGED
|
@@ -17772,7 +17772,7 @@ You must follow the <manual/>, obey the <rules/>, and use the <format/>.
|
|
|
17772
17772
|
|
|
17773
17773
|
<parameters>
|
|
17774
17774
|
\`tool\` - Which tool to execute: "man" to get schemas, or a tool name to execute
|
|
17775
|
-
\`args\` - For "man":
|
|
17775
|
+
\`args\` - For "man": { tools: ["tool1", "tool2"] }. For other tools: tool parameters that strictly adhere to the tool's JSON schema.
|
|
17776
17776
|
</parameters>
|
|
17777
17777
|
|
|
17778
17778
|
<rules>
|
|
@@ -17787,7 +17787,7 @@ Get tool schemas:
|
|
|
17787
17787
|
\`\`\`json
|
|
17788
17788
|
{
|
|
17789
17789
|
"tool": "man",
|
|
17790
|
-
"args": ["tool1", "tool2"]
|
|
17790
|
+
"args": { "tools": ["tool1", "tool2"] }
|
|
17791
17791
|
}
|
|
17792
17792
|
\`\`\`
|
|
17793
17793
|
|
|
@@ -17886,6 +17886,106 @@ var CompiledPrompts = {
|
|
|
17886
17886
|
completionMessage: () => ResponseTemplates.COMPLETION_MESSAGE
|
|
17887
17887
|
};
|
|
17888
17888
|
|
|
17889
|
+
// __mcpc__core_latest/node_modules/@mcpc/core/src/factories/args-def-factory.js
|
|
17890
|
+
function createArgsDefFactory(_name, _allToolNames, _depGroups, _predefinedSteps, _ensureStepActions) {
|
|
17891
|
+
return {
|
|
17892
|
+
forSampling: function() {
|
|
17893
|
+
return {
|
|
17894
|
+
type: "object",
|
|
17895
|
+
description: "Provide prompt for autonomous tool execution",
|
|
17896
|
+
properties: {
|
|
17897
|
+
prompt: {
|
|
17898
|
+
type: "string",
|
|
17899
|
+
description: "The task to be completed autonomously by the agentic system using available tools"
|
|
17900
|
+
},
|
|
17901
|
+
context: {
|
|
17902
|
+
type: "object",
|
|
17903
|
+
description: "Execution context, e.g., { cwd: '/path/to/dir' }. Any relevant fields allowed.",
|
|
17904
|
+
additionalProperties: true
|
|
17905
|
+
}
|
|
17906
|
+
},
|
|
17907
|
+
required: [
|
|
17908
|
+
"prompt",
|
|
17909
|
+
"context"
|
|
17910
|
+
],
|
|
17911
|
+
errorMessage: {
|
|
17912
|
+
required: {
|
|
17913
|
+
prompt: "Missing required field 'prompt'. Please provide a clear task description.",
|
|
17914
|
+
context: "Missing required field 'context'. Please provide relevant context (e.g., { cwd: '...' })."
|
|
17915
|
+
}
|
|
17916
|
+
}
|
|
17917
|
+
};
|
|
17918
|
+
},
|
|
17919
|
+
/**
|
|
17920
|
+
* Agentic schema - simplified Unix-style interface
|
|
17921
|
+
*
|
|
17922
|
+
* Only two fields:
|
|
17923
|
+
* - `tool`: which tool to execute (enum includes "man" + all tool names)
|
|
17924
|
+
* - `args`: object with parameters. For "man": { tools: ["a", "b"] }. For others: tool parameters.
|
|
17925
|
+
*/
|
|
17926
|
+
forAgentic: function(allToolNames) {
|
|
17927
|
+
const toolEnum = [
|
|
17928
|
+
"man",
|
|
17929
|
+
...allToolNames
|
|
17930
|
+
];
|
|
17931
|
+
return {
|
|
17932
|
+
type: "object",
|
|
17933
|
+
properties: {
|
|
17934
|
+
tool: {
|
|
17935
|
+
type: "string",
|
|
17936
|
+
enum: toolEnum,
|
|
17937
|
+
description: 'Which tool to execute. Use "man" to get tool schemas, or a tool name to execute.',
|
|
17938
|
+
errorMessage: {
|
|
17939
|
+
enum: `Invalid tool. Available: ${toolEnum.join(", ")}`
|
|
17940
|
+
}
|
|
17941
|
+
},
|
|
17942
|
+
args: {
|
|
17943
|
+
type: "object",
|
|
17944
|
+
description: `For "man": { tools: ["tool1", "tool2"] }. For other tools: tool parameters that strictly adhere to the tool's JSON schema.`
|
|
17945
|
+
}
|
|
17946
|
+
},
|
|
17947
|
+
required: [
|
|
17948
|
+
"tool"
|
|
17949
|
+
],
|
|
17950
|
+
additionalProperties: false
|
|
17951
|
+
};
|
|
17952
|
+
},
|
|
17953
|
+
/**
|
|
17954
|
+
* Schema for "man" command args validation
|
|
17955
|
+
* Expected format: { tools: ["tool1", "tool2"] }
|
|
17956
|
+
*/
|
|
17957
|
+
forMan: function(allToolNames) {
|
|
17958
|
+
return {
|
|
17959
|
+
type: "object",
|
|
17960
|
+
properties: {
|
|
17961
|
+
tools: {
|
|
17962
|
+
type: "array",
|
|
17963
|
+
items: {
|
|
17964
|
+
type: "string",
|
|
17965
|
+
enum: allToolNames,
|
|
17966
|
+
errorMessage: {
|
|
17967
|
+
enum: `Invalid tool name. Available: ${allToolNames.join(", ")}`
|
|
17968
|
+
}
|
|
17969
|
+
},
|
|
17970
|
+
minItems: 1,
|
|
17971
|
+
errorMessage: {
|
|
17972
|
+
minItems: "At least one tool name is required"
|
|
17973
|
+
}
|
|
17974
|
+
}
|
|
17975
|
+
},
|
|
17976
|
+
required: [
|
|
17977
|
+
"tools"
|
|
17978
|
+
],
|
|
17979
|
+
errorMessage: {
|
|
17980
|
+
required: {
|
|
17981
|
+
tools: 'Missing "tools" field. Expected: { tools: ["tool1", "tool2"] }'
|
|
17982
|
+
}
|
|
17983
|
+
}
|
|
17984
|
+
};
|
|
17985
|
+
}
|
|
17986
|
+
};
|
|
17987
|
+
}
|
|
17988
|
+
|
|
17889
17989
|
// __mcpc__core_latest/node_modules/@mcpc/core/src/utils/schema-validator.js
|
|
17890
17990
|
import { Ajv as Ajv2 } from "ajv";
|
|
17891
17991
|
import addFormats from "ajv-formats";
|
|
@@ -18057,22 +18157,9 @@ var AgenticExecutor = class {
|
|
|
18057
18157
|
}
|
|
18058
18158
|
const tool2 = args.tool;
|
|
18059
18159
|
if (tool2 === "man") {
|
|
18060
|
-
const
|
|
18061
|
-
|
|
18062
|
-
|
|
18063
|
-
type: "string",
|
|
18064
|
-
enum: this.allToolNames,
|
|
18065
|
-
errorMessage: {
|
|
18066
|
-
enum: `Invalid tool name. Available: ${this.allToolNames.join(", ")}`
|
|
18067
|
-
}
|
|
18068
|
-
},
|
|
18069
|
-
minItems: 1,
|
|
18070
|
-
errorMessage: {
|
|
18071
|
-
type: 'Expected an array of tool names, e.g. ["tool1", "tool2"]',
|
|
18072
|
-
minItems: "At least one tool name is required"
|
|
18073
|
-
}
|
|
18074
|
-
};
|
|
18075
|
-
const manValidation = validateSchema(args.args ?? [], manSchema);
|
|
18160
|
+
const createArgsDef = createArgsDefFactory(this.name, this.allToolNames, {});
|
|
18161
|
+
const manSchema = createArgsDef.forMan(this.allToolNames);
|
|
18162
|
+
const manValidation = validateSchema(args.args ?? {}, manSchema);
|
|
18076
18163
|
if (!manValidation.valid) {
|
|
18077
18164
|
return {
|
|
18078
18165
|
content: [
|
|
@@ -18084,7 +18171,8 @@ var AgenticExecutor = class {
|
|
|
18084
18171
|
isError: true
|
|
18085
18172
|
};
|
|
18086
18173
|
}
|
|
18087
|
-
|
|
18174
|
+
const argsObj = args.args;
|
|
18175
|
+
return this.handleManCommand(argsObj.tools, executeSpan);
|
|
18088
18176
|
}
|
|
18089
18177
|
const toolArgs = args.args || {};
|
|
18090
18178
|
return await this.executeTool(tool2, toolArgs, executeSpan);
|
|
@@ -18261,72 +18349,6 @@ ${JSON.stringify(cleanedSchema, null, 2)}
|
|
|
18261
18349
|
}
|
|
18262
18350
|
};
|
|
18263
18351
|
|
|
18264
|
-
// __mcpc__core_latest/node_modules/@mcpc/core/src/factories/args-def-factory.js
|
|
18265
|
-
function createArgsDefFactory(_name, _allToolNames, _depGroups, _predefinedSteps, _ensureStepActions) {
|
|
18266
|
-
return {
|
|
18267
|
-
forSampling: function() {
|
|
18268
|
-
return {
|
|
18269
|
-
type: "object",
|
|
18270
|
-
description: "Provide prompt for autonomous tool execution",
|
|
18271
|
-
properties: {
|
|
18272
|
-
prompt: {
|
|
18273
|
-
type: "string",
|
|
18274
|
-
description: "The task to be completed autonomously by the agentic system using available tools"
|
|
18275
|
-
},
|
|
18276
|
-
context: {
|
|
18277
|
-
type: "object",
|
|
18278
|
-
description: "Execution context, e.g., { cwd: '/path/to/dir' }. Any relevant fields allowed.",
|
|
18279
|
-
additionalProperties: true
|
|
18280
|
-
}
|
|
18281
|
-
},
|
|
18282
|
-
required: [
|
|
18283
|
-
"prompt",
|
|
18284
|
-
"context"
|
|
18285
|
-
],
|
|
18286
|
-
errorMessage: {
|
|
18287
|
-
required: {
|
|
18288
|
-
prompt: "Missing required field 'prompt'. Please provide a clear task description.",
|
|
18289
|
-
context: "Missing required field 'context'. Please provide relevant context (e.g., { cwd: '...' })."
|
|
18290
|
-
}
|
|
18291
|
-
}
|
|
18292
|
-
};
|
|
18293
|
-
},
|
|
18294
|
-
/**
|
|
18295
|
-
* Agentic schema - simplified Unix-style interface
|
|
18296
|
-
*
|
|
18297
|
-
* Only two fields:
|
|
18298
|
-
* - `tool`: which tool to execute (enum includes "man" + all tool names)
|
|
18299
|
-
* - `args`: parameters for the tool (array for "man", object for others)
|
|
18300
|
-
*/
|
|
18301
|
-
forAgentic: function(allToolNames) {
|
|
18302
|
-
const toolEnum = [
|
|
18303
|
-
"man",
|
|
18304
|
-
...allToolNames
|
|
18305
|
-
];
|
|
18306
|
-
return {
|
|
18307
|
-
type: "object",
|
|
18308
|
-
properties: {
|
|
18309
|
-
tool: {
|
|
18310
|
-
type: "string",
|
|
18311
|
-
enum: toolEnum,
|
|
18312
|
-
description: 'Which tool to execute. Use "man" to get tool schemas, or a tool name to execute.',
|
|
18313
|
-
errorMessage: {
|
|
18314
|
-
enum: `Invalid tool. Available: ${toolEnum.join(", ")}`
|
|
18315
|
-
}
|
|
18316
|
-
},
|
|
18317
|
-
args: {
|
|
18318
|
-
description: 'For "man": array of tool names ["tool1", "tool2"]. For other tools: object with parameters.'
|
|
18319
|
-
}
|
|
18320
|
-
},
|
|
18321
|
-
required: [
|
|
18322
|
-
"tool"
|
|
18323
|
-
],
|
|
18324
|
-
additionalProperties: false
|
|
18325
|
-
};
|
|
18326
|
-
}
|
|
18327
|
-
};
|
|
18328
|
-
}
|
|
18329
|
-
|
|
18330
18352
|
// __mcpc__core_latest/node_modules/@mcpc/core/src/executors/agentic/agentic-tool-registrar.js
|
|
18331
18353
|
function registerAgenticTool(server, { description, name, allToolNames, depGroups, toolNameToDetailList }) {
|
|
18332
18354
|
const createArgsDef = createArgsDefFactory(name, allToolNames, depGroups, void 0, void 0);
|
|
@@ -19652,7 +19674,7 @@ var ToolManager = class {
|
|
|
19652
19674
|
description,
|
|
19653
19675
|
schema
|
|
19654
19676
|
});
|
|
19655
|
-
if (options.
|
|
19677
|
+
if (options.hidden) {
|
|
19656
19678
|
this.toolConfigs.set(name, {
|
|
19657
19679
|
visibility: {
|
|
19658
19680
|
hidden: true
|
|
@@ -19672,6 +19694,11 @@ var ToolManager = class {
|
|
|
19672
19694
|
inputSchema: schema
|
|
19673
19695
|
});
|
|
19674
19696
|
}
|
|
19697
|
+
this.toolConfigs.set(name, {
|
|
19698
|
+
visibility: {
|
|
19699
|
+
public: true
|
|
19700
|
+
}
|
|
19701
|
+
});
|
|
19675
19702
|
}
|
|
19676
19703
|
/**
|
|
19677
19704
|
* Check if a tool is public (exposed to MCP clients)
|
|
@@ -20280,11 +20307,11 @@ var ComposableMCPServer = class extends Server {
|
|
|
20280
20307
|
const toolNameToDetailList = Object.entries(allTools);
|
|
20281
20308
|
const publicToolNames = this.getPublicToolNames();
|
|
20282
20309
|
const hiddenToolNames = this.getHiddenToolNames();
|
|
20283
|
-
const contextToolNames = toolNameToDetailList.map(([name2]) => name2).filter((n) => !hiddenToolNames.includes(n));
|
|
20310
|
+
const contextToolNames = toolNameToDetailList.map(([name2]) => name2).filter((n) => !hiddenToolNames.includes(n) && !publicToolNames.includes(n));
|
|
20284
20311
|
publicToolNames.forEach((toolId) => {
|
|
20285
20312
|
const tool2 = allTools[toolId];
|
|
20286
20313
|
if (!tool2) {
|
|
20287
|
-
|
|
20314
|
+
return;
|
|
20288
20315
|
}
|
|
20289
20316
|
this.tool(toolId, tool2.description || "", jsonSchema(tool2.inputSchema), tool2.execute, {
|
|
20290
20317
|
internal: false
|
package/package.json
CHANGED
package/plugins/large-result.cjs
CHANGED
|
@@ -73,15 +73,13 @@ function createSearchPlugin(options = {}) {
|
|
|
73
73
|
const timeoutMs = options.timeoutMs || 3e4;
|
|
74
74
|
const global = options.global ?? true;
|
|
75
75
|
const agentName = options.agentName;
|
|
76
|
-
const toolName = agentName ? `${agentName}
|
|
76
|
+
const toolName = agentName ? `${agentName}__grep` : "mcpc__grep";
|
|
77
77
|
const activeTimeouts = /* @__PURE__ */ new Set();
|
|
78
78
|
return {
|
|
79
79
|
name: "plugin-search",
|
|
80
80
|
version: "1.0.0",
|
|
81
81
|
configureServer: (server) => {
|
|
82
|
-
const defaultDescription = agentName ? `
|
|
83
|
-
Only search within the allowed directory: ${allowedSearchDir}` : `Search for text patterns in files and directories. Use this to find specific content, code, or information within files. Provide a simple literal string or a regular expression. If your pattern is a regex, ensure it's valid; otherwise use quotes or escape special characters to treat it as a literal string.
|
|
84
|
-
Only search within the allowed directory: ${allowedSearchDir}`;
|
|
82
|
+
const defaultDescription = agentName ? `Grep/search for text patterns within large tool result files for the "${agentName}" agent. **IMPORTANT**: You MUST execute the actual tool first and get a "Result too large, saved to file" response before using this grep tool. This tool searches within previously saved large results only. Provide a simple literal string or a regular expression. Only search within the allowed directory: ${allowedSearchDir}` : `Grep/search for text patterns within large tool result files. **IMPORTANT**: You MUST execute the actual tool first and get a "Result too large, saved to file" response before using this grep tool. This tool searches within previously saved large results only. Provide a simple literal string or a regular expression. If your pattern is a regex, ensure it's valid. Only search within the allowed directory: ${allowedSearchDir}`;
|
|
85
83
|
const toolDescription = options.toolDescription || defaultDescription;
|
|
86
84
|
server.tool(toolName, toolDescription, jsonSchema({
|
|
87
85
|
type: "object",
|
|
@@ -300,7 +298,7 @@ function createLargeResultPlugin(options = {}) {
|
|
|
300
298
|
let tempDir = options.tempDir || null;
|
|
301
299
|
let serverRef = null;
|
|
302
300
|
let agentName = null;
|
|
303
|
-
const defaultSearchDescription = `
|
|
301
|
+
const defaultSearchDescription = `Grep/search within large tool result files that were saved due to size limits. **IMPORTANT**: You MUST execute the actual tool first and get a "Result too large, saved to file" response before using this grep tool. This tool is ONLY for searching within previously saved large results, not for general file search. Provide specific keywords or regex patterns related to the content you're looking for.`;
|
|
304
302
|
return {
|
|
305
303
|
name: "plugin-large-result-handler",
|
|
306
304
|
version: "1.0.0",
|
|
@@ -316,7 +314,8 @@ function createLargeResultPlugin(options = {}) {
|
|
|
316
314
|
maxResults: options.search?.maxResults || 15,
|
|
317
315
|
maxOutputSize: options.search?.maxOutputSize || 4e3,
|
|
318
316
|
toolDescription: options.search?.toolDescription || defaultSearchDescription,
|
|
319
|
-
global:
|
|
317
|
+
global: false,
|
|
318
|
+
// Internal tool only - not exposed externally
|
|
320
319
|
agentName
|
|
321
320
|
};
|
|
322
321
|
const searchPlugin = createSearchPlugin(searchConfig);
|
|
@@ -325,7 +324,7 @@ function createLargeResultPlugin(options = {}) {
|
|
|
325
324
|
},
|
|
326
325
|
transformTool: (tool, context) => {
|
|
327
326
|
const originalExecute = tool.execute;
|
|
328
|
-
const searchToolName = agentName ? `${agentName}
|
|
327
|
+
const searchToolName = agentName ? `${agentName}__grep` : "mcpc__grep";
|
|
329
328
|
tool.execute = async (args) => {
|
|
330
329
|
try {
|
|
331
330
|
const result = await originalExecute(args);
|
package/plugins/large-result.mjs
CHANGED
|
@@ -41,15 +41,13 @@ function createSearchPlugin(options = {}) {
|
|
|
41
41
|
const timeoutMs = options.timeoutMs || 3e4;
|
|
42
42
|
const global = options.global ?? true;
|
|
43
43
|
const agentName = options.agentName;
|
|
44
|
-
const toolName = agentName ? `${agentName}
|
|
44
|
+
const toolName = agentName ? `${agentName}__grep` : "mcpc__grep";
|
|
45
45
|
const activeTimeouts = /* @__PURE__ */ new Set();
|
|
46
46
|
return {
|
|
47
47
|
name: "plugin-search",
|
|
48
48
|
version: "1.0.0",
|
|
49
49
|
configureServer: (server) => {
|
|
50
|
-
const defaultDescription = agentName ? `
|
|
51
|
-
Only search within the allowed directory: ${allowedSearchDir}` : `Search for text patterns in files and directories. Use this to find specific content, code, or information within files. Provide a simple literal string or a regular expression. If your pattern is a regex, ensure it's valid; otherwise use quotes or escape special characters to treat it as a literal string.
|
|
52
|
-
Only search within the allowed directory: ${allowedSearchDir}`;
|
|
50
|
+
const defaultDescription = agentName ? `Grep/search for text patterns within large tool result files for the "${agentName}" agent. **IMPORTANT**: You MUST execute the actual tool first and get a "Result too large, saved to file" response before using this grep tool. This tool searches within previously saved large results only. Provide a simple literal string or a regular expression. Only search within the allowed directory: ${allowedSearchDir}` : `Grep/search for text patterns within large tool result files. **IMPORTANT**: You MUST execute the actual tool first and get a "Result too large, saved to file" response before using this grep tool. This tool searches within previously saved large results only. Provide a simple literal string or a regular expression. If your pattern is a regex, ensure it's valid. Only search within the allowed directory: ${allowedSearchDir}`;
|
|
53
51
|
const toolDescription = options.toolDescription || defaultDescription;
|
|
54
52
|
server.tool(toolName, toolDescription, jsonSchema({
|
|
55
53
|
type: "object",
|
|
@@ -268,7 +266,7 @@ function createLargeResultPlugin(options = {}) {
|
|
|
268
266
|
let tempDir = options.tempDir || null;
|
|
269
267
|
let serverRef = null;
|
|
270
268
|
let agentName = null;
|
|
271
|
-
const defaultSearchDescription = `
|
|
269
|
+
const defaultSearchDescription = `Grep/search within large tool result files that were saved due to size limits. **IMPORTANT**: You MUST execute the actual tool first and get a "Result too large, saved to file" response before using this grep tool. This tool is ONLY for searching within previously saved large results, not for general file search. Provide specific keywords or regex patterns related to the content you're looking for.`;
|
|
272
270
|
return {
|
|
273
271
|
name: "plugin-large-result-handler",
|
|
274
272
|
version: "1.0.0",
|
|
@@ -284,7 +282,8 @@ function createLargeResultPlugin(options = {}) {
|
|
|
284
282
|
maxResults: options.search?.maxResults || 15,
|
|
285
283
|
maxOutputSize: options.search?.maxOutputSize || 4e3,
|
|
286
284
|
toolDescription: options.search?.toolDescription || defaultSearchDescription,
|
|
287
|
-
global:
|
|
285
|
+
global: false,
|
|
286
|
+
// Internal tool only - not exposed externally
|
|
288
287
|
agentName
|
|
289
288
|
};
|
|
290
289
|
const searchPlugin = createSearchPlugin(searchConfig);
|
|
@@ -293,7 +292,7 @@ function createLargeResultPlugin(options = {}) {
|
|
|
293
292
|
},
|
|
294
293
|
transformTool: (tool, context) => {
|
|
295
294
|
const originalExecute = tool.execute;
|
|
296
|
-
const searchToolName = agentName ? `${agentName}
|
|
295
|
+
const searchToolName = agentName ? `${agentName}__grep` : "mcpc__grep";
|
|
297
296
|
tool.execute = async (args) => {
|
|
298
297
|
try {
|
|
299
298
|
const result = await originalExecute(args);
|
package/plugins/search.cjs
CHANGED
|
@@ -68,15 +68,13 @@ function createSearchPlugin(options = {}) {
|
|
|
68
68
|
const timeoutMs = options.timeoutMs || 3e4;
|
|
69
69
|
const global = options.global ?? true;
|
|
70
70
|
const agentName = options.agentName;
|
|
71
|
-
const toolName = agentName ? `${agentName}
|
|
71
|
+
const toolName = agentName ? `${agentName}__grep` : "mcpc__grep";
|
|
72
72
|
const activeTimeouts = /* @__PURE__ */ new Set();
|
|
73
73
|
return {
|
|
74
74
|
name: "plugin-search",
|
|
75
75
|
version: "1.0.0",
|
|
76
76
|
configureServer: (server) => {
|
|
77
|
-
const defaultDescription = agentName ? `
|
|
78
|
-
Only search within the allowed directory: ${allowedSearchDir}` : `Search for text patterns in files and directories. Use this to find specific content, code, or information within files. Provide a simple literal string or a regular expression. If your pattern is a regex, ensure it's valid; otherwise use quotes or escape special characters to treat it as a literal string.
|
|
79
|
-
Only search within the allowed directory: ${allowedSearchDir}`;
|
|
77
|
+
const defaultDescription = agentName ? `Grep/search for text patterns within large tool result files for the "${agentName}" agent. **IMPORTANT**: You MUST execute the actual tool first and get a "Result too large, saved to file" response before using this grep tool. This tool searches within previously saved large results only. Provide a simple literal string or a regular expression. Only search within the allowed directory: ${allowedSearchDir}` : `Grep/search for text patterns within large tool result files. **IMPORTANT**: You MUST execute the actual tool first and get a "Result too large, saved to file" response before using this grep tool. This tool searches within previously saved large results only. Provide a simple literal string or a regular expression. If your pattern is a regex, ensure it's valid. Only search within the allowed directory: ${allowedSearchDir}`;
|
|
80
78
|
const toolDescription = options.toolDescription || defaultDescription;
|
|
81
79
|
server.tool(
|
|
82
80
|
toolName,
|
package/plugins/search.mjs
CHANGED
|
@@ -36,15 +36,13 @@ function createSearchPlugin(options = {}) {
|
|
|
36
36
|
const timeoutMs = options.timeoutMs || 3e4;
|
|
37
37
|
const global = options.global ?? true;
|
|
38
38
|
const agentName = options.agentName;
|
|
39
|
-
const toolName = agentName ? `${agentName}
|
|
39
|
+
const toolName = agentName ? `${agentName}__grep` : "mcpc__grep";
|
|
40
40
|
const activeTimeouts = /* @__PURE__ */ new Set();
|
|
41
41
|
return {
|
|
42
42
|
name: "plugin-search",
|
|
43
43
|
version: "1.0.0",
|
|
44
44
|
configureServer: (server) => {
|
|
45
|
-
const defaultDescription = agentName ? `
|
|
46
|
-
Only search within the allowed directory: ${allowedSearchDir}` : `Search for text patterns in files and directories. Use this to find specific content, code, or information within files. Provide a simple literal string or a regular expression. If your pattern is a regex, ensure it's valid; otherwise use quotes or escape special characters to treat it as a literal string.
|
|
47
|
-
Only search within the allowed directory: ${allowedSearchDir}`;
|
|
45
|
+
const defaultDescription = agentName ? `Grep/search for text patterns within large tool result files for the "${agentName}" agent. **IMPORTANT**: You MUST execute the actual tool first and get a "Result too large, saved to file" response before using this grep tool. This tool searches within previously saved large results only. Provide a simple literal string or a regular expression. Only search within the allowed directory: ${allowedSearchDir}` : `Grep/search for text patterns within large tool result files. **IMPORTANT**: You MUST execute the actual tool first and get a "Result too large, saved to file" response before using this grep tool. This tool searches within previously saved large results only. Provide a simple literal string or a regular expression. If your pattern is a regex, ensure it's valid. Only search within the allowed directory: ${allowedSearchDir}`;
|
|
48
46
|
const toolDescription = options.toolDescription || defaultDescription;
|
|
49
47
|
server.tool(
|
|
50
48
|
toolName,
|
package/plugins.cjs
CHANGED
|
@@ -72,15 +72,13 @@ function createSearchPlugin(options = {}) {
|
|
|
72
72
|
const timeoutMs = options.timeoutMs || 3e4;
|
|
73
73
|
const global = options.global ?? true;
|
|
74
74
|
const agentName = options.agentName;
|
|
75
|
-
const toolName = agentName ? `${agentName}
|
|
75
|
+
const toolName = agentName ? `${agentName}__grep` : "mcpc__grep";
|
|
76
76
|
const activeTimeouts = /* @__PURE__ */ new Set();
|
|
77
77
|
return {
|
|
78
78
|
name: "plugin-search",
|
|
79
79
|
version: "1.0.0",
|
|
80
80
|
configureServer: (server) => {
|
|
81
|
-
const defaultDescription = agentName ? `
|
|
82
|
-
Only search within the allowed directory: ${allowedSearchDir}` : `Search for text patterns in files and directories. Use this to find specific content, code, or information within files. Provide a simple literal string or a regular expression. If your pattern is a regex, ensure it's valid; otherwise use quotes or escape special characters to treat it as a literal string.
|
|
83
|
-
Only search within the allowed directory: ${allowedSearchDir}`;
|
|
81
|
+
const defaultDescription = agentName ? `Grep/search for text patterns within large tool result files for the "${agentName}" agent. **IMPORTANT**: You MUST execute the actual tool first and get a "Result too large, saved to file" response before using this grep tool. This tool searches within previously saved large results only. Provide a simple literal string or a regular expression. Only search within the allowed directory: ${allowedSearchDir}` : `Grep/search for text patterns within large tool result files. **IMPORTANT**: You MUST execute the actual tool first and get a "Result too large, saved to file" response before using this grep tool. This tool searches within previously saved large results only. Provide a simple literal string or a regular expression. If your pattern is a regex, ensure it's valid. Only search within the allowed directory: ${allowedSearchDir}`;
|
|
84
82
|
const toolDescription = options.toolDescription || defaultDescription;
|
|
85
83
|
server.tool(toolName, toolDescription, jsonSchema({
|
|
86
84
|
type: "object",
|
|
@@ -303,7 +301,7 @@ function createLargeResultPlugin(options = {}) {
|
|
|
303
301
|
let tempDir = options.tempDir || null;
|
|
304
302
|
let serverRef = null;
|
|
305
303
|
let agentName = null;
|
|
306
|
-
const defaultSearchDescription = `
|
|
304
|
+
const defaultSearchDescription = `Grep/search within large tool result files that were saved due to size limits. **IMPORTANT**: You MUST execute the actual tool first and get a "Result too large, saved to file" response before using this grep tool. This tool is ONLY for searching within previously saved large results, not for general file search. Provide specific keywords or regex patterns related to the content you're looking for.`;
|
|
307
305
|
return {
|
|
308
306
|
name: "plugin-large-result-handler",
|
|
309
307
|
version: "1.0.0",
|
|
@@ -318,7 +316,7 @@ function createLargeResultPlugin(options = {}) {
|
|
|
318
316
|
maxResults: options.search?.maxResults || 15,
|
|
319
317
|
maxOutputSize: options.search?.maxOutputSize || 4e3,
|
|
320
318
|
toolDescription: options.search?.toolDescription || defaultSearchDescription,
|
|
321
|
-
global:
|
|
319
|
+
global: false,
|
|
322
320
|
agentName
|
|
323
321
|
};
|
|
324
322
|
const searchPlugin = createSearchPlugin(searchConfig);
|
|
@@ -327,7 +325,7 @@ function createLargeResultPlugin(options = {}) {
|
|
|
327
325
|
},
|
|
328
326
|
transformTool: (tool, context) => {
|
|
329
327
|
const originalExecute = tool.execute;
|
|
330
|
-
const searchToolName = agentName ? `${agentName}
|
|
328
|
+
const searchToolName = agentName ? `${agentName}__grep` : "mcpc__grep";
|
|
331
329
|
tool.execute = async (args) => {
|
|
332
330
|
try {
|
|
333
331
|
const result = await originalExecute(args);
|
package/plugins.mjs
CHANGED
|
@@ -36,15 +36,13 @@ function createSearchPlugin(options = {}) {
|
|
|
36
36
|
const timeoutMs = options.timeoutMs || 3e4;
|
|
37
37
|
const global = options.global ?? true;
|
|
38
38
|
const agentName = options.agentName;
|
|
39
|
-
const toolName = agentName ? `${agentName}
|
|
39
|
+
const toolName = agentName ? `${agentName}__grep` : "mcpc__grep";
|
|
40
40
|
const activeTimeouts = /* @__PURE__ */ new Set();
|
|
41
41
|
return {
|
|
42
42
|
name: "plugin-search",
|
|
43
43
|
version: "1.0.0",
|
|
44
44
|
configureServer: (server) => {
|
|
45
|
-
const defaultDescription = agentName ? `
|
|
46
|
-
Only search within the allowed directory: ${allowedSearchDir}` : `Search for text patterns in files and directories. Use this to find specific content, code, or information within files. Provide a simple literal string or a regular expression. If your pattern is a regex, ensure it's valid; otherwise use quotes or escape special characters to treat it as a literal string.
|
|
47
|
-
Only search within the allowed directory: ${allowedSearchDir}`;
|
|
45
|
+
const defaultDescription = agentName ? `Grep/search for text patterns within large tool result files for the "${agentName}" agent. **IMPORTANT**: You MUST execute the actual tool first and get a "Result too large, saved to file" response before using this grep tool. This tool searches within previously saved large results only. Provide a simple literal string or a regular expression. Only search within the allowed directory: ${allowedSearchDir}` : `Grep/search for text patterns within large tool result files. **IMPORTANT**: You MUST execute the actual tool first and get a "Result too large, saved to file" response before using this grep tool. This tool searches within previously saved large results only. Provide a simple literal string or a regular expression. If your pattern is a regex, ensure it's valid. Only search within the allowed directory: ${allowedSearchDir}`;
|
|
48
46
|
const toolDescription = options.toolDescription || defaultDescription;
|
|
49
47
|
server.tool(toolName, toolDescription, jsonSchema({
|
|
50
48
|
type: "object",
|
|
@@ -267,7 +265,7 @@ function createLargeResultPlugin(options = {}) {
|
|
|
267
265
|
let tempDir = options.tempDir || null;
|
|
268
266
|
let serverRef = null;
|
|
269
267
|
let agentName = null;
|
|
270
|
-
const defaultSearchDescription = `
|
|
268
|
+
const defaultSearchDescription = `Grep/search within large tool result files that were saved due to size limits. **IMPORTANT**: You MUST execute the actual tool first and get a "Result too large, saved to file" response before using this grep tool. This tool is ONLY for searching within previously saved large results, not for general file search. Provide specific keywords or regex patterns related to the content you're looking for.`;
|
|
271
269
|
return {
|
|
272
270
|
name: "plugin-large-result-handler",
|
|
273
271
|
version: "1.0.0",
|
|
@@ -282,7 +280,7 @@ function createLargeResultPlugin(options = {}) {
|
|
|
282
280
|
maxResults: options.search?.maxResults || 15,
|
|
283
281
|
maxOutputSize: options.search?.maxOutputSize || 4e3,
|
|
284
282
|
toolDescription: options.search?.toolDescription || defaultSearchDescription,
|
|
285
|
-
global:
|
|
283
|
+
global: false,
|
|
286
284
|
agentName
|
|
287
285
|
};
|
|
288
286
|
const searchPlugin = createSearchPlugin(searchConfig);
|
|
@@ -291,7 +289,7 @@ function createLargeResultPlugin(options = {}) {
|
|
|
291
289
|
},
|
|
292
290
|
transformTool: (tool, context) => {
|
|
293
291
|
const originalExecute = tool.execute;
|
|
294
|
-
const searchToolName = agentName ? `${agentName}
|
|
292
|
+
const searchToolName = agentName ? `${agentName}__grep` : "mcpc__grep";
|
|
295
293
|
tool.execute = async (args) => {
|
|
296
294
|
try {
|
|
297
295
|
const result = await originalExecute(args);
|
package/types/src/compose.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export declare class ComposableMCPServer extends Server {
|
|
|
18
18
|
private resolveToolName: any;
|
|
19
19
|
tool<T>(name: string, description: string, paramsSchema: Schema<T> | JSONSchema, cb: (args: T, extra?: unknown) => unknown, options?: {
|
|
20
20
|
internal?: boolean;
|
|
21
|
+
hidden?: boolean;
|
|
21
22
|
plugins?: ToolPlugin[];
|
|
22
23
|
}): void;
|
|
23
24
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose.d.ts","sources":["../../src/compose.ts"],"names":[],"mappings":"AAAA,SAGE,KAAK,cAAc,EAGnB,KAAK,IAAI,6CAC8C;AACzD,SAAwC,KAAK,MAAM,4BAA4B;AAC/E,cAAc,UAAU,6BAA6B;AACrD,SACE,MAAM,EACN,KAAK,aAAa,oDAC4C;AAGhE,cAAc,iBAAiB,kCAAkC;AACjE,cAAc,UAAU,EAAE,YAAY,qBAAqB;AAM3D,cAA4B,UAAU,EAAE,UAAU,4BAA4B;AAe9E,OAAO,cAAM,4BAA4B;EACvC,QAAQ,mBAA6B;EACrC,QAAQ,iBAAyB;EACjC,QAAQ,YAAsC;EAG9C,IAAI,mBAAmB,IAAI,MAAM,EAAE,MAAM;EAIzC,YAAY,aAAa,cAAc,EAAE,SAAS,aAAa;EAiB/D;;GAEC,GACD,AAAM,sBAAsB,QAAQ,IAAI;UAqB1B;UAsDN;EAIR,KAAK,GACH,MAAM,MAAM,EACZ,aAAa,MAAM,EACnB,cAAc,OAAO,KAAK,UAAU,EACpC,KAAK,MAAM,GAAG,QAAQ,OAAO,KAAK,OAAO,EACzC;IAAW,WAAW,OAAO;IAAE,UAAU;
|
|
1
|
+
{"version":3,"file":"compose.d.ts","sources":["../../src/compose.ts"],"names":[],"mappings":"AAAA,SAGE,KAAK,cAAc,EAGnB,KAAK,IAAI,6CAC8C;AACzD,SAAwC,KAAK,MAAM,4BAA4B;AAC/E,cAAc,UAAU,6BAA6B;AACrD,SACE,MAAM,EACN,KAAK,aAAa,oDAC4C;AAGhE,cAAc,iBAAiB,kCAAkC;AACjE,cAAc,UAAU,EAAE,YAAY,qBAAqB;AAM3D,cAA4B,UAAU,EAAE,UAAU,4BAA4B;AAe9E,OAAO,cAAM,4BAA4B;EACvC,QAAQ,mBAA6B;EACrC,QAAQ,iBAAyB;EACjC,QAAQ,YAAsC;EAG9C,IAAI,mBAAmB,IAAI,MAAM,EAAE,MAAM;EAIzC,YAAY,aAAa,cAAc,EAAE,SAAS,aAAa;EAiB/D;;GAEC,GACD,AAAM,sBAAsB,QAAQ,IAAI;UAqB1B;UAsDN;EAIR,KAAK,GACH,MAAM,MAAM,EACZ,aAAa,MAAM,EACnB,cAAc,OAAO,KAAK,UAAU,EACpC,KAAK,MAAM,GAAG,QAAQ,OAAO,KAAK,OAAO,EACzC;IAAW,WAAW,OAAO;IAAE,SAAS,OAAO;IAAE,UAAU;GACvD;EA+DN;;GAEC,GACD,gBAAgB,MAAM,MAAM,GAAG,eAAe,SAAS;EAIvD;;GAEC,GACD,eAAe,QAAQ,MAAM,GAAG,aAAa,SAAS;EAItD;;GAEC,GACD,AAAM,SAAS,MAAM,MAAM,EAAE,MAAM,OAAO,GAAG,QAAQ,OAAO;EAyB5D;;GAEC,GACD,sBAAsB,MAAM;EAI5B;;GAEC,GACD,kBAAkB;EAIlB;;GAEC,GACD,sBAAsB,MAAM;EAI5B;;GAEC,GACD,wBAAwB,MAAM;EAM9B;;GAEC,GACD,oBACE,MAAM,MAAM;IACT,aAAa,MAAM;IAAE,QAAQ;MAAe,SAAS;EAI1D;;GAEC,GACD,aAAa,MAAM,MAAM,GAAG,OAAO;EAInC;;GAEC,GACD,WAAW,UAAU,MAAM,EAAE,QAAQ,UAAU,GAAG,IAAI;EAItD;;GAEC,GACD,cAAc,UAAU,MAAM,GAAG,aAAa,SAAS;EAIvD;;GAEC,GACD,iBAAiB,UAAU,MAAM,GAAG,OAAO;EAI3C;;GAEC,GACD,AAAM,UAAU,QAAQ,UAAU,GAAG,QAAQ,IAAI;EAIjD;;GAEC,GACD,AAAM,mBACJ,YAAY,MAAM,EAClB;IAAW,QAAQ,OAAO;GAAoB,GAC7C,QAAQ,IAAI;UAOD;EAOd;;GAEC,GACD,AAAM,kBAAkB,QAAQ,IAAI;EAIpC;;GAEC,GACD,SAAe,SAAS,QAAQ,IAAI;EAK9B,QACJ,MAAM,MAAM,GAAG,IAAI,EACnB,aAAa,MAAM,EACnB,aAAY,UAA+B,EAC3C,UAAS,kBAAkB,UAAgC;AAiR/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"large-result.d.ts","sources":["../../../src/plugins/large-result.ts"],"names":[],"mappings":"AAQA,SAA6B,KAAK,aAAa,2BAA2B;AAC1E,cAAmC,UAAU,6BAA6B;UAGhE;EACR,UAAU,MAAM;EAChB,cAAc,MAAM;EACpB,UAAU,MAAM;EAChB,SAAS;;AAGX;;;CAGC,GACD,OAAO,iBAAS,wBACd,UAAS,aAAkB,GAC1B;
|
|
1
|
+
{"version":3,"file":"large-result.d.ts","sources":["../../../src/plugins/large-result.ts"],"names":[],"mappings":"AAQA,SAA6B,KAAK,aAAa,2BAA2B;AAC1E,cAAmC,UAAU,6BAA6B;UAGhE;EACR,UAAU,MAAM;EAChB,cAAc,MAAM;EACpB,UAAU,MAAM;EAChB,SAAS;;AAGX;;;CAGC,GACD,OAAO,iBAAS,wBACd,UAAS,aAAkB,GAC1B;AAoHH;;CAEC,GACD,cAAM,0BAA0B;AAMhC,OAAO,cAAM,kBAAuC;AAEpD,eAAe,yBAAyB"}
|
|
@@ -9,7 +9,7 @@ import type { ToolPlugin } from "../plugin-types.js";
|
|
|
9
9
|
/** Whether search should be case sensitive (default: false) */ caseSensitive?: boolean;
|
|
10
10
|
/** Search timeout in milliseconds (default: 30000) */ timeoutMs?: number;
|
|
11
11
|
/** Custom description for the search tool (overrides default) */ toolDescription?: string;
|
|
12
|
-
/** Agent name prefix for tool naming (e.g., "my-agent" -> "my-
|
|
12
|
+
/** Agent name prefix for tool naming (e.g., "my-agent" -> "my-agent__grep") */ agentName?: string;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Create a search plugin that adds file search capability with size limits
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-tool.d.ts","sources":["../../../src/plugins/search-tool.ts"],"names":[],"mappings":"AASA,cAAc,UAAU,6BAA6B;AAIrD;;CAEC,GACD,iBAAiB;EACf,sDAAsD,GACtD,SAAS,OAAO;EAChB,6DAA6D,GAC7D,aAAa,MAAM;EACnB,sDAAsD,GACtD,gBAAgB,MAAM;EACtB,mHAAmH,GACnH,aAAa,MAAM;EACnB,6DAA6D,GAC7D,gBAAgB,OAAO;EACvB,oDAAoD,GACpD,YAAY,MAAM;EAClB,+DAA+D,GAC/D,kBAAkB,MAAM;EACxB,
|
|
1
|
+
{"version":3,"file":"search-tool.d.ts","sources":["../../../src/plugins/search-tool.ts"],"names":[],"mappings":"AASA,cAAc,UAAU,6BAA6B;AAIrD;;CAEC,GACD,iBAAiB;EACf,sDAAsD,GACtD,SAAS,OAAO;EAChB,6DAA6D,GAC7D,aAAa,MAAM;EACnB,sDAAsD,GACtD,gBAAgB,MAAM;EACtB,mHAAmH,GACnH,aAAa,MAAM;EACnB,6DAA6D,GAC7D,gBAAgB,OAAO;EACvB,oDAAoD,GACpD,YAAY,MAAM;EAClB,+DAA+D,GAC/D,kBAAkB,MAAM;EACxB,6EAA6E,GAC7E,YAAY,MAAM;;AAGpB;;CAEC,GACD,OAAO,iBAAS,mBAAmB,UAAS,aAAkB,GAAG;AA0QjE;;CAEC,GACD,cAAM,qBAAqB;AAS3B,OAAO,cAAM,kBAAkC;AAE/C,eAAe,oBAAoB"}
|