Skip to main content
Glama

getProjectsAllocationsTime

Retrieve logged time entries for a specific project allocation in Teamwork. Filter by date ranges, sort options, and access permissions to track work hours.

Instructions

Get time entries for a specific allocation. Return logged time entries for a specific allocation. Only the time entries that the logged-in user can access will be returned.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allocationIdYesfilter by allocation id
updatedAfterNofilter by updated after date
startDateNofilter by a starting date
endDateNofilter by an ending date
orderByNosort order
orderModeNoorder mode
pageNopage number
pageSizeNonumber of items in a page
includeTotalsNoinclude totals
includePermissionsNoinclude permissions

Implementation Reference

  • The main handler function for the getProjectsAllocationsTime MCP tool. It calls the underlying service and formats the response as text content or handles errors.
    export async function handleGetProjectsAllocationsTime(input: any) {
      try {
        const response = await getAllocationTimeService(input);
        return {
          content: [{
            type: "text",
            text: JSON.stringify(response, null, 2)
          }]
        };
      } catch (error: any) {
        return createErrorResponse(error, 'Getting allocation time entries');
      }
    } 
  • The tool definition including name, description, input schema, and annotations for the getProjectsAllocationsTime tool.
    export const getProjectsAllocationsTimeDefinition = {
      name: "getProjectsAllocationsTime",
      description: "Get time entries for a specific allocation. Return logged time entries for a specific allocation. Only the time entries that the logged-in user can access will be returned.",
      inputSchema: {
        type: 'object',
        properties: {
          allocationId: {
            type: 'integer',
            description: 'filter by allocation id'
          },
          updatedAfter: {
            type: 'string',
            description: 'filter by updated after date'
          },
          startDate: {
            type: 'string',
            description: 'filter by a starting date'
          },
          endDate: {
            type: 'string',
            description: 'filter by an ending date'
          },
          orderBy: {
            type: 'string',
            description: 'sort order',
            enum: [
              'company',
              'date',
              'dateupdated',
              'project',
              'task',
              'tasklist',
              'user',
              'description',
              'billed',
              'billable',
              'timespent'
            ]
          },
          orderMode: {
            type: 'string',
            description: 'order mode',
            enum: [
              'asc',
              'desc'
            ]
          },
          page: {
            type: 'integer',
            description: 'page number'
          },
          pageSize: {
            type: 'integer',
            description: 'number of items in a page'
          },
          includeTotals: {
            type: 'boolean',
            description: 'include totals'
          },
          includePermissions: {
            type: 'boolean',
            description: 'include permissions'
          }
        },
        required: ['allocationId']
      },
      annotations: {
        title: "Get Time Entries for a Specific Allocation",
        readOnlyHint: false,
        destructiveHint: false,
        openWorldHint: false
      }
    };
  • The registration of the getProjectsAllocationsTime tool in the central toolPairs array, linking its definition and handler.
    { definition: getAllocationTime, handler: handleGetProjectsAllocationsTime },
  • Import of the tool definition and handler from the implementation file.
    import { getProjectsAllocationsTimeDefinition as getAllocationTime, handleGetProjectsAllocationsTime } from './time/getAllocationTime.js';
  • Re-export of the handler for use elsewhere.
    export { handleGetProjectsAllocationsTime } from './time/getAllocationTime.js';
Behavior3/5

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

Annotations indicate readOnlyHint=false, destructiveHint=false, and openWorldHint=false, covering safety and scope. The description adds context about user access restrictions ('Only the time entries that the logged-in user can access will be returned'), which is valuable beyond annotations. However, it lacks details on rate limits, pagination behavior, or error handling, leaving gaps in behavioral understanding.

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

Conciseness4/5

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

The description is concise and front-loaded, with two sentences that directly state the tool's purpose and a key constraint. There is no wasted text, but it could be slightly more structured (e.g., separating purpose from limitations). Overall, it's efficient and clear.

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 (10 parameters, no output schema), the description is minimally adequate. It covers the core purpose and access restriction, but lacks details on return format, error cases, or integration with sibling tools. With annotations providing safety info and schema covering parameters, the description meets basic needs but leaves room for improvement in contextual guidance.

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 parameters are well-documented in the schema. The description does not add any parameter-specific semantics beyond what the schema provides (e.g., it doesn't clarify date formats or filtering logic). With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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 tool's purpose: 'Get time entries for a specific allocation' and 'Return logged time entries for a specific allocation.' It specifies the verb ('get'/'return') and resource ('time entries'), but does not explicitly differentiate it from sibling tools like 'getTime' or 'getTasks' beyond the allocation focus, which is implied but not stated.

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?

The description provides minimal usage guidance: it mentions that only accessible time entries are returned, but offers no explicit when-to-use advice, alternatives (e.g., vs. 'getTime'), or exclusions. Without clear context on when this tool is preferred over siblings, the agent lacks practical direction.

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/Vizioz/Teamwork-MCP'

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