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

Function withRequiredProjectPath

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

Source from the content-addressed store, hash-verified

2138}
2139
2140function withRequiredProjectPath(defs: ToolDefinition[]): ToolDefinition[] {
2141 return defs.map((tool) => {
2142 if (!tool.inputSchema.properties.projectPath) return tool;
2143 const required = tool.inputSchema.required ?? [];
2144 if (required.includes('projectPath')) return tool;
2145 return {
2146 ...tool,
2147 inputSchema: { ...tool.inputSchema, required: [...required, 'projectPath'] },
2148 };
2149 });
2150}
2151
2152/**
2153 * 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