Skip to main content
Glama

create_test_folder

Create a test folder for organizing Android app testing files and results through ADB automation.

Instructions

Create a test folder with the specified name

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
test_nameYesName of the test folder to create

Implementation Reference

  • The core handler function implementing the create_test_folder tool logic. It creates a directory for the given test_name under the base test path and returns a confirmation message.
    create_test_folder: async (args: any) => { const { test_name } = args as { test_name: string }; const testPath = path.join(getBaseTestPath(), test_name); await createDirectory(testPath); return { content: [ { type: 'text', text: `Test folder created: ${testPath}`, }, ], }; },
  • The schema definition for the create_test_folder tool, including input validation for the required 'test_name' parameter.
    { name: 'create_test_folder', description: 'Create a test folder with the specified name', inputSchema: { type: 'object', properties: { test_name: { type: 'string', description: 'Name of the test folder to create', }, }, required: ['test_name'], }, },
  • src/index.ts:26-30 (registration)
    Registration of the ListTools request handler, which exposes the tool definitions including create_test_folder.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: toolDefinitions, }; });
  • src/index.ts:32-46 (registration)
    Registration of the CallTool request handler, which dynamically invokes the handler for create_test_folder (or other tools) based on the tool name.
    server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; try { const handler = toolHandlers[name as keyof typeof toolHandlers]; if (!handler) { throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`); } return await handler(args); } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); throw new McpError(ErrorCode.InternalError, `Tool execution failed: ${errorMessage}`); } });
  • Helper function called by the handler to create the test directory, with cross-platform support.
    export async function createDirectory(dirPath: string): Promise<void> { const platform = os.platform(); if (platform === 'win32') { execSync(`mkdir "${dirPath}"`, { encoding: 'utf8' }); } else { execSync(`mkdir -p "${dirPath}"`, { encoding: 'utf8' }); } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TiagoDanin/Android-Debug-Bridge-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server