MCPcopy Index your code
hub / github.com/CommandCodeAI/BaseAI / isToolPresent

Function isToolPresent

packages/baseai/src/utils/is-tool-present.ts:11–21  ·  view source on GitHub ↗
({
	name,
	allTools
}: {
	name: string;
	allTools: string[];
})

Source from the content-addressed store, hash-verified

9 * @returns {boolean} - Returns `true` if the tool is present, otherwise `false`.
10 */
11export function isToolPresent({
12 name,
13 allTools
14}: {
15 name: string;
16 allTools: string[];
17}) {
18 return allTools.some(tool => {
19 return slugify(tool) === slugify(name);
20 });
21}

Callers 2

createLocalToolFunction · 0.90
createToolFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected