Skip to main content
Glama

timecard_get_activities

Retrieve project activities with IDs, names, and values for timesheet entry in TimeCard MCP. Use the returned activity_value to log hours with timecard_save.

Instructions

Get list of activities for a specific project. Returns activity id, name, and value.

The 'value' field (format: "bottom$uid$pid$progress") is the activity_value needed by timecard_save's entries parameter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesProject ID to get activities for

Implementation Reference

  • Handler implementation for timecard_get_activities. It fetches activities via session, filters them by project_id and isBottom status, and formats the response.
    handler: async (args, session: TimeCardSession) => {
      const authResult = await session.ensureAuthenticated();
      if (!authResult.success) {
        throw new Error(authResult.message);
      }
    
      const safeArgs = args || {};
      const { project_id } = safeArgs;
    
      try {
        const allActivities = await session.getActivityList();
    
        // Filter to leaf activities (isBottom='true') for the specified project
        const activities = allActivities
          .filter(a => a.projectId === project_id && a.isBottom === 'true')
          .map(a => ({
            id: a.uid,
            name: a.name.replace(/<<.*?>>/, '').trim(),
            description: a.name.replace(/<<.*?>>/, '').trim(),
            value: `${a.isBottom}$${a.uid}$${a.projectId}$${a.progress}`
          }));
    
        return {
          project_id,
          activities,
          count: activities.length
        };
      } catch (error) {
        throw new Error(`Failed to get activities for project ${project_id}: ${error instanceof Error ? error.message : 'Unknown error'}`);
      }
    }
  • Input schema definition for timecard_get_activities, requiring a project_id string.
    inputSchema: {
      type: 'object',
      properties: {
        project_id: {
          type: 'string',
          description: 'Project ID to get activities for'
        }
      },
      required: ['project_id']
    },
  • Registration of the timecard_get_activities tool in the dataTools array.
    timecardGetActivities,
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool returns a list with specific fields (id, name, value) and explains the 'value' field format, which adds useful context beyond a basic read operation. However, it doesn't cover other behavioral aspects like error handling, authentication needs, rate limits, or whether it's read-only (implied by 'Get' but not explicit). The value format detail is helpful but incomplete for full transparency.

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 appropriately sized and front-loaded: the first sentence states the core purpose, and the second adds crucial context about the 'value' field. Both sentences earn their place by providing essential information without redundancy. However, it could be slightly more structured (e.g., bullet points for returns) and misses a brief usage hint, keeping it from a perfect score.

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 low complexity (1 parameter, no output schema, no annotations), the description is somewhat complete but has gaps. It explains the return fields and value format, which is helpful, but lacks output structure details (e.g., list format, pagination) and behavioral context. Without annotations or output schema, the description should do more to compensate, but it provides a minimal viable explanation, making it adequate but not thorough.

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?

The input schema has 100% description coverage, with 'project_id' clearly documented. The description adds no additional parameter semantics beyond what the schema provides—it doesn't explain what a 'project_id' is, how to obtain it, or any constraints. Since the schema does the heavy lifting, 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 list of activities for a specific project.' It specifies the verb ('Get'), resource ('activities'), and scope ('for a specific project'), making the intent unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'timecard_get_projects' or 'timecard_get_timesheet', which likely retrieve different data types, so it misses the highest mark.

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 no guidance on when to use this tool versus alternatives. It mentions that the 'value' field is needed by 'timecard_save', which hints at a dependency but doesn't clarify when to choose this over other get tools (e.g., 'timecard_get_projects' for projects vs. activities). There's no explicit when/when-not or alternative usage context, leaving the agent to infer based on tool names alone.

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/keith-hung/timecard-mcp'

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