Decision Journal ACTION
Create Decision
Creates a new decision in the Decision Journal. See the documentation
- Action
- Writes data
- OAuth
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Decision Journal account once, then configure and run Create Decision 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: "decision_journal-create-decision",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
decision_journal: { authProvisionId: "apn_xxxxxxx" },
title: "Title",
tags: ["Tags"],
},
})
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": "decision_journal-create-decision",
"configured_props": {
"decision_journal": { "authProvisionId": "apn_xxxxxxx" },
"title": "Title",
"tags": ["Tags"]
}
}'// 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": "decision_journal",
},
},
},
)
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: "decision_journal-create-decision",
arguments: {
title: "Title",
tags: ["Tags"],
},
})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 |
|---|---|---|
title Title | string | The title of the decision Required |
tags Tags | string[] | Tags for a decision to organize Optional |
status Status | string | The status of a decision or review Required |
context Context | string | The context or background of the decision Required |
expectedOutcome Expected Outcome | string | The expected outcome of the decision Required |
outcomeEstimates Outcome Estimates | string[] | An array of outcome estimates in JSON string format. For each estimate, the format is {"text": "A description of an outcome estimate", "probability": "0.50"} Optional |
skillLuckWeight Skill-Luck Weight | string | A number between 0 and 1 representing the weight of skill vs luck in the outcome Optional |
monthsToNextReview Months to Next Review | integer | The number of months until the next review of the decision Required |
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
- decision_journal-create-decision
- Version
- 0.0.2
- App
- Decision Journal
- Authentication
- OAuth
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗