MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / withRequiredProjectPath

Function withRequiredProjectPath

src/mcp/tools.ts:1987–1997  ·  view source on GitHub ↗
(defs: ToolDefinition[])

Source from the content-addressed store, hash-verified

1985}
1986
1987function withRequiredProjectPath(defs: ToolDefinition[]): ToolDefinition[] {
1988 return defs.map((tool) => {
1989 if (!tool.inputSchema.properties.projectPath) return tool;
1990 const required = tool.inputSchema.required ?? [];
1991 if (required.includes('projectPath')) return tool;
1992 return {
1993 ...tool,
1994 inputSchema: { ...tool.inputSchema, required: [...required, 'projectPath'] },
1995 };
1996 });
1997}
1998
1999/**
2000 * Allowlist-filtered tool definitions WITHOUT an engine — the static surface the

Callers 1

getToolsMethod · 0.85

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected