Skip to main content
Glama

getProjectsAllocationsTime

Retrieve time entries for a specific allocation with filters such as date range, sorting, and pagination. Access only the entries you have permission to view in Teamwork projects.

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
endDateNofilter by an ending date
includePermissionsNoinclude permissions
includeTotalsNoinclude totals
orderByNosort order
orderModeNoorder mode
pageNopage number
pageSizeNonumber of items in a page
startDateNofilter by a starting date
updatedAfterNofilter by updated after date

Implementation Reference

  • The handler function for the 'getProjectsAllocationsTime' tool. It calls the underlying service with the input parameters and returns the JSON-formatted response or an error message.
    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 { content: [{ type: "text", text: `Error: ${error.message}` }] }; } }
  • The tool definition including name, description, input schema, and annotations.
    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 } };
  • Registration of the tool in the central toolPairs array, associating the definition and handler for use in toolDefinitions and toolHandlersMap.
    { definition: getAllocationTime, handler: handleGetProjectsAllocationsTime },
  • Import of the tool definition and handler from the specific implementation file.
    import { getProjectsAllocationsTimeDefinition as getAllocationTime, handleGetProjectsAllocationsTime } from './time/getAllocationTime.js';

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