Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"author": "Linked API",
"license": "MIT",
"dependencies": {
"@linkedapi/node": "^2.1.1",
"@linkedapi/node": "^2.1.3",
"@modelcontextprotocol/sdk": "^1.17.4",
"zod": "^4.1.1"
},
Expand Down
4 changes: 4 additions & 0 deletions src/linked-api-tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ import { GetApiUsageTool } from './tools/get-api-usage-stats.js';
import { GetConversationTool } from './tools/get-conversation.js';
import { GetInboxTool } from './tools/get-inbox.js';
import { GetWorkflowResultTool } from './tools/get-workflow-result.js';
import { ManageConversationTool } from './tools/manage-conversation.js';
import { NvFetchCompanyTool } from './tools/nv-fetch-company.js';
import { NvFetchPersonTool } from './tools/nv-fetch-person.js';
import { NvGetConversationTool } from './tools/nv-get-conversation.js';
import { NvManageConversationTool } from './tools/nv-manage-conversation.js';
import { NvSearchCompaniesTool } from './tools/nv-search-companies.js';
import { NvSearchPeopleTool } from './tools/nv-search-people.js';
import { NvSendMessageTool } from './tools/nv-send-message.js';
Expand Down Expand Up @@ -75,6 +77,7 @@ export class LinkedApiTools {
new GetConversationTool(),
new SyncInboxTool(),
new GetInboxTool(),
new ManageConversationTool(),
new CheckConnectionStatusTool(),
new RetrieveConnectionsTool(),
new SendConnectionRequestTool(),
Expand All @@ -97,6 +100,7 @@ export class LinkedApiTools {
new NvSendMessageTool(),
new NvGetConversationTool(),
new NvSyncInboxTool(),
new NvManageConversationTool(),
new NvSearchCompaniesTool(),
new NvSearchPeopleTool(),
new NvFetchCompanyTool(),
Expand Down
37 changes: 37 additions & 0 deletions src/tools/manage-conversation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { OPERATION_NAME, TManageConversationParams } from '@linkedapi/node';
import { Tool } from '@modelcontextprotocol/sdk/types.js';
import { z } from 'zod';

import { OperationTool } from '../utils/linked-api-tool.js';

export class ManageConversationTool extends OperationTool<TManageConversationParams, unknown> {
public override readonly name = 'manage_conversation';
public override readonly operationName = OPERATION_NAME.manageConversation;
protected override readonly schema = z.object({
threadId: z.string(),
operation: z.enum(['archive', 'unarchive', 'star', 'unstar', 'mute', 'unmute']),
});

public override getTool(): Tool {
return {
name: this.name,
description:
'Archive, star, or mute a conversation thread by threadId (st.manageConversation action). Provide the threadId as returned by get_inbox and the operation to perform.',
inputSchema: {
type: 'object',
properties: {
threadId: {
type: 'string',
description: 'Conversation thread identifier, as returned by get_inbox.',
},
operation: {
type: 'string',
description: 'Operation to perform on the conversation thread.',
enum: ['archive', 'unarchive', 'star', 'unstar', 'mute', 'unmute'],
},
},
required: ['threadId', 'operation'],
},
};
}
}
37 changes: 37 additions & 0 deletions src/tools/nv-manage-conversation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { OPERATION_NAME, TNvManageConversationParams } from '@linkedapi/node';
import { Tool } from '@modelcontextprotocol/sdk/types.js';
import { z } from 'zod';

import { OperationTool } from '../utils/linked-api-tool.js';

export class NvManageConversationTool extends OperationTool<TNvManageConversationParams, unknown> {
public override readonly name = 'nv_manage_conversation';
public override readonly operationName = OPERATION_NAME.nvManageConversation;
protected override readonly schema = z.object({
threadId: z.string(),
operation: z.enum(['archive', 'unarchive']),
});

public override getTool(): Tool {
return {
name: this.name,
description:
'Archive or unarchive a Sales Navigator conversation thread by threadId (nv.manageConversation action). Provide the threadId as returned by get_inbox and the operation to perform.',
inputSchema: {
type: 'object',
properties: {
threadId: {
type: 'string',
description: 'Conversation thread identifier, as returned by get_inbox.',
},
operation: {
type: 'string',
description: 'Operation to perform on the Sales Navigator conversation thread.',
enum: ['archive', 'unarchive'],
},
},
required: ['threadId', 'operation'],
},
};
}
}