kojee-mcp 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-TJNNT7XM.js → chunk-WIXI3EVR.js} +19 -15
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -573,7 +573,7 @@ var ToolRegistry = class {
|
|
|
573
573
|
for (const [connectorId, info] of this.connectors) {
|
|
574
574
|
const toolNames = info.tools.map((t) => t.name).join(", ");
|
|
575
575
|
tools.push({
|
|
576
|
-
name:
|
|
576
|
+
name: connectorId,
|
|
577
577
|
description: `${connectorId} tools available via Kojee (${info.tools.length} tools: ${toolNames}). Call this tool to see descriptions and details for each.`,
|
|
578
578
|
inputSchema: { type: "object", properties: {} }
|
|
579
579
|
});
|
|
@@ -644,11 +644,16 @@ import {
|
|
|
644
644
|
ListToolsRequestSchema,
|
|
645
645
|
CallToolRequestSchema
|
|
646
646
|
} from "@modelcontextprotocol/sdk/types.js";
|
|
647
|
-
var
|
|
647
|
+
var UTILITY_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
648
|
+
"get_tool_schema",
|
|
649
|
+
"call_tool",
|
|
650
|
+
"check_approval",
|
|
651
|
+
"revoke_request"
|
|
652
|
+
]);
|
|
648
653
|
var UTILITY_TOOLS = [
|
|
649
654
|
{
|
|
650
|
-
name: "
|
|
651
|
-
description: "Get the full input schema for one or more Kojee tools. Call this before
|
|
655
|
+
name: "get_tool_schema",
|
|
656
|
+
description: "Get the full input schema for one or more Kojee tools. Call this before call_tool to know the exact parameters required.",
|
|
652
657
|
inputSchema: {
|
|
653
658
|
type: "object",
|
|
654
659
|
properties: {
|
|
@@ -662,8 +667,8 @@ var UTILITY_TOOLS = [
|
|
|
662
667
|
}
|
|
663
668
|
},
|
|
664
669
|
{
|
|
665
|
-
name: "
|
|
666
|
-
description: "Call a Kojee tool by name with the specified arguments. Use the connector tools (e.g. kojee_gmail) to discover tools, then
|
|
670
|
+
name: "call_tool",
|
|
671
|
+
description: "Call a Kojee tool by name with the specified arguments. Use the connector tools (e.g. kojee_gmail) to discover tools, then get_tool_schema to get parameters, then this to execute.",
|
|
667
672
|
inputSchema: {
|
|
668
673
|
type: "object",
|
|
669
674
|
properties: {
|
|
@@ -681,7 +686,7 @@ var UTILITY_TOOLS = [
|
|
|
681
686
|
}
|
|
682
687
|
},
|
|
683
688
|
{
|
|
684
|
-
name: "
|
|
689
|
+
name: "check_approval",
|
|
685
690
|
description: "Check the status of a pending approval request. Use this after a tool call returns 'require_approval' to poll whether the user has approved or denied.",
|
|
686
691
|
inputSchema: {
|
|
687
692
|
type: "object",
|
|
@@ -695,7 +700,7 @@ var UTILITY_TOOLS = [
|
|
|
695
700
|
}
|
|
696
701
|
},
|
|
697
702
|
{
|
|
698
|
-
name: "
|
|
703
|
+
name: "revoke_request",
|
|
699
704
|
description: "Revoke/cancel a pending approval request you no longer need.",
|
|
700
705
|
inputSchema: {
|
|
701
706
|
type: "object",
|
|
@@ -731,16 +736,15 @@ function createMcpServer(registry) {
|
|
|
731
736
|
});
|
|
732
737
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
733
738
|
const { name, arguments: args } = request.params;
|
|
734
|
-
if (
|
|
735
|
-
const
|
|
736
|
-
const toolList = registry.getConnectorToolList(connectorId);
|
|
739
|
+
if (!UTILITY_TOOL_NAMES.has(name)) {
|
|
740
|
+
const toolList = registry.getConnectorToolList(name);
|
|
737
741
|
return {
|
|
738
742
|
content: [{ type: "text", text: toolList }],
|
|
739
743
|
isError: false
|
|
740
744
|
};
|
|
741
745
|
}
|
|
742
746
|
switch (name) {
|
|
743
|
-
case "
|
|
747
|
+
case "get_tool_schema": {
|
|
744
748
|
const names = args?.names ?? [];
|
|
745
749
|
if (names.length === 0) {
|
|
746
750
|
return {
|
|
@@ -754,7 +758,7 @@ function createMcpServer(registry) {
|
|
|
754
758
|
isError: false
|
|
755
759
|
};
|
|
756
760
|
}
|
|
757
|
-
case "
|
|
761
|
+
case "call_tool": {
|
|
758
762
|
const toolName = args?.name;
|
|
759
763
|
if (!toolName) {
|
|
760
764
|
return {
|
|
@@ -770,8 +774,8 @@ function createMcpServer(registry) {
|
|
|
770
774
|
isError: result.isError
|
|
771
775
|
};
|
|
772
776
|
}
|
|
773
|
-
case "
|
|
774
|
-
case "
|
|
777
|
+
case "check_approval":
|
|
778
|
+
case "revoke_request": {
|
|
775
779
|
const rawResult = await registry.callTool(name, args ?? {});
|
|
776
780
|
const result = translateToolCallResult(rawResult);
|
|
777
781
|
return {
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED