@shortcut/mcp 0.8.0 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +54 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -21669,7 +21669,7 @@ var import_client = __toESM(require_lib(), 1);
21669
21669
 
21670
21670
  // package.json
21671
21671
  var name = "@shortcut/mcp";
21672
- var version = "0.8.0";
21672
+ var version = "0.8.2";
21673
21673
 
21674
21674
  // src/tools/base.ts
21675
21675
  class BaseTools {
@@ -21719,11 +21719,45 @@ class BaseTools {
21719
21719
  } = entity;
21720
21720
  return { id, name: name2, email_address, mention_name, role, disabled, is_owner };
21721
21721
  }
21722
+ getSimplifiedStory(entity) {
21723
+ if (!entity)
21724
+ return null;
21725
+ const {
21726
+ id,
21727
+ name: name2,
21728
+ app_url,
21729
+ archived,
21730
+ group_id,
21731
+ epic_id,
21732
+ iteration_id,
21733
+ workflow_id,
21734
+ workflow_state_id,
21735
+ owner_ids,
21736
+ requested_by_id
21737
+ } = entity;
21738
+ return {
21739
+ id,
21740
+ name: name2,
21741
+ app_url,
21742
+ archived,
21743
+ team_id: group_id || null,
21744
+ epic_id: epic_id || null,
21745
+ iteration_id: iteration_id || null,
21746
+ workflow_id,
21747
+ workflow_state_id,
21748
+ owner_ids,
21749
+ requested_by_id
21750
+ };
21751
+ }
21722
21752
  getSimplifiedWorkflow(entity) {
21723
21753
  if (!entity)
21724
21754
  return null;
21725
21755
  const { id, name: name2, states } = entity;
21726
- return { id, name: name2, states: states.map((state) => ({ id: state.id, name: state.name })) };
21756
+ return {
21757
+ id,
21758
+ name: name2,
21759
+ states: states.map((state) => ({ id: state.id, name: state.name, type: state.type }))
21760
+ };
21727
21761
  }
21728
21762
  getSimplifiedTeam(entity) {
21729
21763
  if (!entity)
@@ -21754,8 +21788,8 @@ class BaseTools {
21754
21788
  getSimplifiedIteration(entity) {
21755
21789
  if (!entity)
21756
21790
  return null;
21757
- const { id, name: name2, app_url, group_ids, status } = entity;
21758
- return { id, name: name2, app_url, team_ids: group_ids, status };
21791
+ const { id, name: name2, app_url, group_ids, status, start_date, end_date } = entity;
21792
+ return { id, name: name2, app_url, team_ids: group_ids, status, start_date, end_date };
21759
21793
  }
21760
21794
  async getRelatedEntitiesForTeam(entity) {
21761
21795
  if (!entity)
@@ -21873,6 +21907,21 @@ class BaseTools {
21873
21907
  return this.getRelatedEntitiesForStory(entity);
21874
21908
  return {};
21875
21909
  }
21910
+ getSimplifiedEntity(entity) {
21911
+ if (entity.entity_type === "group")
21912
+ return this.getSimplifiedTeam(entity);
21913
+ if (entity.entity_type === "iteration")
21914
+ return this.getSimplifiedIteration(entity);
21915
+ if (entity.entity_type === "epic")
21916
+ return this.getSimplifiedEpic(entity);
21917
+ if (entity.entity_type === "story")
21918
+ return this.getSimplifiedStory(entity);
21919
+ if (entity.entity_type === "milestone")
21920
+ return this.getSimplifiedObjective(entity);
21921
+ if (entity.entity_type === "workflow")
21922
+ return this.getSimplifiedWorkflow(entity);
21923
+ return entity;
21924
+ }
21876
21925
  async entityWithRelatedEntities(entity, entityType = "entity") {
21877
21926
  const relatedEntities = await this.getRelatedEntities(entity);
21878
21927
  return {
@@ -21883,7 +21932,7 @@ class BaseTools {
21883
21932
  async entitiesWithRelatedEntities(entities, entityType = "entities") {
21884
21933
  const relatedEntities = await Promise.all(entities.map((entity) => this.getRelatedEntities(entity)));
21885
21934
  return {
21886
- [entityType]: entities.map((entity) => this.renameEntityProps(entity)),
21935
+ [entityType]: entities.map((entity) => this.getSimplifiedEntity(entity)),
21887
21936
  relatedEntities: this.mergeRelatedEntities(relatedEntities)
21888
21937
  };
21889
21938
  }
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "modelcontextprotocol"
13
13
  ],
14
14
  "license": "MIT",
15
- "version": "0.8.0",
15
+ "version": "0.8.2",
16
16
  "type": "module",
17
17
  "main": "dist/index.js",
18
18
  "bin": {