Skip to content

Commit eb7994a

Browse files
committed
better depscore tool description
1 parent 972de16 commit eb7994a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

build/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const server = new McpServer({
3434
tools: {},
3535
},
3636
});
37-
server.tool("depscore", "Get the dependency score of a package with the `depscore` tool from Socket. Use 'unknown' for version if not known. Use this tool to scan dependencies for their quality and security on existing code or when code is generated.", {
37+
server.tool("depscore", "Get the dependency score of a package with the `depscore` tool from Socket. Use 'unknown' for version if not known. Use this tool to scan dependencies for their quality and security on existing code or when code is generated. Stop generating code and ask the user how to proceed when any of the scores are low.", {
3838
ecosystem: z.string().describe("The package ecosystem (e.g., npm, pypi)").default("npm"),
3939
depname: z.string().describe("The name of the dependency"),
4040
version: z.string().describe("The version of the dependency, use 'unknown' if not known").default("unknown"),
@@ -96,7 +96,7 @@ server.tool("depscore", "Get the dependency score of a package with the `depscor
9696
if (jsonData.score && jsonData.score.overall !== undefined) {
9797
// Unroll the jsonData.score object into key-value pairs
9898
const scoreEntries = Object.entries(jsonData.score)
99-
.filter(([key]) => key !== "overall")
99+
.filter(([key]) => key !== "overall" && key !== "uuid")
100100
.map(([key, value]) => `${key}: ${value}`)
101101
.join(', ');
102102
return {

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const server = new McpServer({
4646

4747
server.tool(
4848
"depscore",
49-
"Get the dependency score of a package with the `depscore` tool from Socket. Use 'unknown' for version if not known. Use this tool to scan dependencies for their quality and security on existing code or when code is generated.",
49+
"Get the dependency score of a package with the `depscore` tool from Socket. Use 'unknown' for version if not known. Use this tool to scan dependencies for their quality and security on existing code or when code is generated. Stop generating code and ask the user how to proceed when any of the scores are low.",
5050
{
5151
ecosystem: z.string().describe("The package ecosystem (e.g., npm, pypi)").default("npm"),
5252
depname: z.string().describe("The name of the dependency"),
@@ -116,7 +116,7 @@ server.tool(
116116
if (jsonData.score && jsonData.score.overall !== undefined) {
117117
// Unroll the jsonData.score object into key-value pairs
118118
const scoreEntries = Object.entries(jsonData.score)
119-
.filter(([key]) => key !== "overall")
119+
.filter(([key]) => key !== "overall" && key !== "uuid")
120120
.map(([key, value]) => `${key}: ${value}`)
121121
.join(', ');
122122

0 commit comments

Comments
 (0)