Skip to main content
Glama

update-allocation

Modify an allocation's project, person, dates, hours, notes, billable status, task type, or status using its task ID.

Instructions

Update an existing allocation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesThe allocation ID (task_id in Float API)
project_idNoProject ID
people_idNoPerson ID
start_dateNoAllocation start date (YYYY-MM-DD)
end_dateNoAllocation end date (YYYY-MM-DD)
hoursNoNumber of hours allocated
notesNoAllocation notes
billableNoBillable flag (0=non-billable, 1=billable)
task_typeNoTask type
statusNoStatus (numeric)

Implementation Reference

  • The handler function for the update-allocation tool. It accepts a task_id and optional fields (project_id, people_id, start_date, end_date, hours, notes, billable, task_type, status), destructures task_id from the rest, and sends a PATCH request to /tasks/{task_id} via floatApi.
    // Update allocation
    export const updateAllocation = createTool(
      'update-allocation',
      'Update an existing allocation',
      z.object({
        task_id: z.union([z.string(), z.number()]).describe('The allocation ID (task_id in Float API)'),
        project_id: z.number().optional().describe('Project ID'),
        people_id: z.number().optional().describe('Person ID'),
        start_date: z.string().optional().describe('Allocation start date (YYYY-MM-DD)'),
        end_date: z.string().optional().describe('Allocation end date (YYYY-MM-DD)'),
        hours: z.number().optional().describe('Number of hours allocated'),
        notes: z.string().optional().describe('Allocation notes'),
        billable: z.number().optional().describe('Billable flag (0=non-billable, 1=billable)'),
        task_type: z.number().optional().describe('Task type'),
        status: z.number().optional().describe('Status (numeric)'),
      }),
      async (params) => {
        const { task_id, ...updateData } = params;
        const allocation = await floatApi.patch(`/tasks/${task_id}`, updateData, allocationSchema);
        return allocation;
      }
    );
  • Input schema for update-allocation using zod. Requires task_id, all other fields are optional for partial updates.
    z.object({
      task_id: z.union([z.string(), z.number()]).describe('The allocation ID (task_id in Float API)'),
      project_id: z.number().optional().describe('Project ID'),
      people_id: z.number().optional().describe('Person ID'),
      start_date: z.string().optional().describe('Allocation start date (YYYY-MM-DD)'),
      end_date: z.string().optional().describe('Allocation end date (YYYY-MM-DD)'),
      hours: z.number().optional().describe('Number of hours allocated'),
      notes: z.string().optional().describe('Allocation notes'),
      billable: z.number().optional().describe('Billable flag (0=non-billable, 1=billable)'),
      task_type: z.number().optional().describe('Task type'),
      status: z.number().optional().describe('Status (numeric)'),
    }),
  • updateAllocation is imported from './project-management/allocations.js' and included in the legacyTools array (line 236) which is exported as part of the tools array.
    listAllocations,
    getAllocation,
    createAllocation,
    updateAllocation,
    deleteAllocation,
  • The FloatApi.patch method used by the update-allocation handler to make the PATCH request to the Float API.
    async patch<T>(
      url: string,
      data: unknown,
      schema?: z.ZodType<T>,
      format: ResponseFormat = 'json'
    ): Promise<T> {
      return this.handleRateLimitRetry(() => this.makeRequest<T>('PATCH', url, data, schema, format));
    }
  • The allocation response schema (zod) used to validate the API response from the PATCH request.
    export const allocationSchema = z.object({
      task_id: z.number().optional(), // Float API uses task_id for allocations
      project_id: z.number().optional(),
      people_id: z.number().optional(), // Float API uses people_id, not person_id
      start_date: z.string().nullable().optional(),
      end_date: z.string().nullable().optional(),
      hours: z.number().nullable().optional(),
      notes: z.string().nullable().optional(),
      created: z.string().nullable().optional(), // Float API uses 'created', not 'created_at'
      modified: z.string().nullable().optional(), // Float API uses 'modified', not 'updated_at'
      billable: z.number().nullable().optional(), // 0 = non-billable, 1 = billable
      repeat_state: z.number().nullable().optional(),
      repeat_end: z.string().nullable().optional(),
      task_type: z.number().nullable().optional(),
      status: z.number().nullable().optional(),
    });
Behavior2/5

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

No annotations are provided, so the description carries full burden. It only says 'update', implying mutation, but lacks details on side effects, permissions, idempotency, or error behavior.

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

Conciseness3/5

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

Single sentence is concise but overly minimal. Could include additional context without being verbose. Every word earns its place, but misses opportunity to inform.

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

Completeness2/5

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

With 10 parameters, no output schema, and no annotations, the description is insufficient. It does not explain return values, required fields beyond schema, or common usage patterns.

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?

Input schema has 100% coverage with descriptions for all 10 parameters. The description adds no extra meaning beyond the schema, so baseline 3 is appropriate.

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 'Update an existing allocation' clearly states the verb (update) and resource (allocation). It distinguishes from sibling tools like create-allocation and delete-allocation, though it does not explicitly contrast them.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives like create-allocation or other update tools. No context on prerequisites or exclusions.

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

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/asachs01/float-mcp'

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