WakaTime ACTION
Log Coding Activity
Log coding activity to WakaTime. See the documentation
- Action
- Writes data
- OAuth
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's WakaTime account once, then configure and run Log Coding Activity from your backend or agent.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "wakatime-log-coding-activity",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
wakatime: { authProvisionId: "apn_xxxxxxx" },
entity: "Entity",
type: "Type",
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "wakatime-log-coding-activity",
"configured_props": {
"wakatime": { "authProvisionId": "apn_xxxxxxx" },
"entity": "Entity",
"type": "Type"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "wakatime",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "wakatime-log-coding-activity",
arguments: {
entity: "Entity",
type: "Type",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
entity Entity | string | The entity heartbeat is logging time against, such as an absolute file path or domain Required |
type Type | string | Type of entity (file, app or domain) Required |
time Time | string | UNIX epoch timestamp; numbers after decimal point are fractions of a second Required |
category Category | string | The category for this activity Optional |
project Project | string | The name of a project Optional Dynamic |
projectRootCount Project Root Count | integer | Count of the number of folders in the project root path (optional); for ex: if the project folder is /Users/user/projects/wakatime and the entity path is /Users/user/projects/wakatime/models/user.py then the project_root_count is 5 and the relative entity path after removing 5 prefix folders is models/user.py Optional |
branch Branch | string | Branch name Optional |
language Language | string | The name of a programming language Optional Dynamic |
dependencies Dependencies | string | Comma separated list of dependencies Optional |
lines Lines | integer | Total number of lines in the entity (when entity type is file) Optional |
lineAdditions Line Additions | integer | Number of lines added since last heartbeat in the current file Optional |
lineDeletions Line Deletions | integer | Number of lines removed since last heartbeat in the current file Optional |
lineNo Line Number | integer | Current line row number of cursor with the first line starting at 1 Optional |
cursorPos Cursor Position | integer | Current cursor column position starting from 1 Optional |
isWrite Is Write | boolean | Whether this heartbeat was triggered from writing to a file Optional |
REFERENCE
Tool details
Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.
- Registry key
- wakatime-log-coding-activity
- Version
- 0.0.2
- App
- WakaTime
- Authentication
- OAuth
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗