Skip to main content
Glama

Create Beep File

create_beep

Generate a beep file to signal task completion and clear a directory for new work. Ideal for coordinating AI agents in shared codebases using file-based signaling within Beep Boop MCP.

Instructions

Creates a beep file to signal that work is complete and the directory is cleared for new work. Use this when work is finished but no boop file exists.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
directoryYesDirectory path where to create the beep file
messageNoOptional completion message

Implementation Reference

  • The main handler function for the create_beep tool that validates input, checks current work status, creates the beep file, and returns appropriate responses.
    export async function handleCreateBeep(params: CreateBeepParams): Promise<ToolResponse> {
      try {
        const { directory, message } = params;
        const config = loadConfig();
        
        // Validate directory access
        try {
          validateDirectoryAccess(directory, config);
        } catch (accessError) {
          if (accessError instanceof CoordinationError) {
            return {
              content: [{
                type: "text",
                text: `❌ ${accessError.message}`
              }],
              isError: true
            };
          }
          throw accessError;
        }
        
        // Check current status first
        const status = await getWorkStatus(directory);
        
        if (status.status === WorkState.WORK_IN_PROGRESS) {
          return {
            content: [{
              type: "text",
              text: `⚠️ Cannot create beep file: Work is currently in progress by agent ${status.agentId}. Use end_work tool instead.`
            }],
            isError: true
          };
        }
    
        await createBeepFile(directory, message, undefined, config);
        
        return {
          content: [{
            type: "text", 
            text: `✅ Beep file created successfully in ${directory}. Work is now marked as complete and cleared for new work.`
          }]
        };
      } catch (error) {
        if (error instanceof CoordinationError) {
          return {
            content: [{
              type: "text",
              text: `❌ ${error.message} (${error.code})`
            }],
            isError: true
          };
        }
        
        return {
          content: [{
            type: "text",
            text: `❌ Unexpected error creating beep file: ${error}`
          }],
          isError: true
        };
      }
    }
  • Zod schema defining the input parameters for the create_beep tool: directory (required string) and message (optional string).
    /**
     * Schema for create_beep tool parameters
     */
    export const CreateBeepSchema = z.object({
      directory: z.string().describe('Directory path where to create the beep file'),
      message: z.string().optional().describe('Optional completion message')
    });
  • src/index.ts:35-45 (registration)
    MCP server registration of the create_beep tool, linking the schema and handler function.
    server.registerTool(
      'create_beep',
      {
        title: 'Create Beep File',
        description: 'Creates a beep file to signal that work is complete and the directory is cleared for new work. Use this when work is finished but no boop file exists.',
        inputSchema: CreateBeepSchema.shape
      },
      async (params) => {
        return await handleCreateBeep(params);
      }
    );
  • Low-level helper function that creates the actual beep file with JSON metadata including completion timestamp, message, and optional completer agent.
    export async function createBeepFile(directory: string, message?: string, completedBy?: string, config?: BeepBoopConfig): Promise<void> {
      try {
        // Verify directory exists
        await fs.access(directory);
        
        const beepPath = join(directory, BEEP_FILE);
        const content: BeepFileContent = {
          completedAt: new Date(),
          message: message || 'Work completed',
          completedBy
        };
        
        await fs.writeFile(beepPath, JSON.stringify(content, null, 2));
        
        // Ensure .gitignore entries if configured
        if (config) {
          await ensureGitIgnoreEntries(directory, config);
        }
      } catch (error) {
        if (error instanceof Error) {
          if ((error as NodeJS.ErrnoException).code === 'ENOENT') {
            throw new CoordinationError(
              `Directory not found: ${directory}`, 
              ErrorCode.DIRECTORY_NOT_FOUND, 
              directory
            );
          } else if ((error as NodeJS.ErrnoException).code === 'EACCES') {
            throw new CoordinationError(
              `Permission denied: ${directory}`, 
              ErrorCode.PERMISSION_DENIED, 
              directory
            );
          }
        }
        throw new CoordinationError(
          `Failed to create beep file: ${error}`, 
          ErrorCode.FILE_SYSTEM_ERROR, 
          directory
        );
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions that the tool creates a file and signals completion, but lacks details on permissions needed, error handling, side effects (e.g., does it modify other files?), or what happens if a boop file already exists. For a file creation tool with zero annotation coverage, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core purpose, and every word earns its place without redundancy. It's efficiently structured and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (file creation with two parameters) and no annotations or output schema, the description is minimally adequate. It explains the purpose and usage context but lacks behavioral details like error cases or return values, which would be needed for full completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters ('directory' and 'message') adequately. The description doesn't add any meaningful parameter details beyond what the schema provides, such as format examples or constraints, but it doesn't need to given the high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('creates a beep file') and purpose ('to signal that work is complete and the directory is cleared for new work'), which is specific and actionable. However, it doesn't explicitly distinguish this tool from sibling tools like 'update_boop' or 'end_work', which might have related functions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool ('when work is finished but no boop file exists'), which helps guide the agent. It doesn't explicitly mention when NOT to use it or name alternatives among siblings, but the condition given is specific enough to be helpful.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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/thesammykins/beep_boop_mcp'

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